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:
@@ -10,7 +10,7 @@
|
||||
<% if local_assigns[:message].present? %>
|
||||
<%= message %>
|
||||
<% else %>
|
||||
<%= t("form.not_saved_html", resource: t("form.#{resource.class.to_s.underscore}")) %>
|
||||
<%= sanitize(t("form.not_saved", resource: t("form.#{resource.class.to_s.underscore}"))) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user