Sanitize translations instead of using _html
Using the `_html` suffix in an i18n key is the same as using `html_safe` on it, which means that translation could potentially be used for XSS attacks.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= f.label :phone, t("verification.sms.new.phone"), class: "inline-block" %>
|
||||
<span class="inline-block"><%= t("verification.sms.new.phone_format_html") %></span>
|
||||
<span class="inline-block"><%= sanitize(t("verification.sms.new.phone_format")) %></span>
|
||||
<p class="help-text" id="phone-text-help"><%= t("verification.sms.new.phone_note") %></p>
|
||||
<%= f.text_field :phone, label: false,
|
||||
placeholder: t("verification.sms.new.phone_placeholder"),
|
||||
|
||||
Reference in New Issue
Block a user