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:
@@ -1,8 +1,8 @@
|
||||
<td style="padding-bottom: 20px; padding-left: 10px;">
|
||||
|
||||
<p style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; font-size: 20px;">
|
||||
<%= t("mailers.direct_message_for_sender.title_html",
|
||||
receiver: @direct_message.receiver.name) %>
|
||||
<%= sanitize(t("mailers.direct_message_for_sender.title",
|
||||
receiver: @direct_message.receiver.name)) %>
|
||||
</p>
|
||||
|
||||
<h2 style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; font-size: 18px;">
|
||||
|
||||
Reference in New Issue
Block a user