]> git.openstreetmap.org Git - rails.git/commit
Avoid using raw in html mailer views
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 2 Dec 2020 15:13:09 +0000 (15:13 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 2 Dec 2020 15:13:09 +0000 (15:13 +0000)
commit78dd142df4057315c236b2186d4860c59f0373c9
tree25edea54ee7444f3ac4f4fdb25292f89ec78fe56
parentdd8e5f04e3ab406de56cce82427a181a11cedec9
Avoid using raw in html mailer views

Use the _html suffix to mark that we expect the translations to contain links.

Unfortunately, we can't use the _html keys for the plain text emails, since the input options (e.g. username, url) will be html-escaped,
before it is passed to the view. So we need to use non-html-suffix keys for the plaintext views, in most cases. Only when the translation
options (e.g. url) are guaranteed to not contain any escapable characters can the same translation key be shared.
app/views/user_mailer/changeset_comment_notification.html.erb
app/views/user_mailer/diary_comment_notification.html.erb
app/views/user_mailer/friendship_notification.html.erb
app/views/user_mailer/message_notification.html.erb
app/views/user_mailer/message_notification.text.erb
app/views/user_mailer/note_comment_notification.html.erb
config/locales/en.yml