Move html_safe declaration for user_mailer from layout to helper

This allows us to enable output safety checks for all code within
erb files.

`rubocop --auto-gen-config` ignores code within the erb files, so
it is easier to maintain an exclusion on the helper than inside
the layout.
This commit is contained in:
Andy Allan 2024-11-27 18:04:32 +00:00
parent d2dc1ff897
commit ce342fede0
4 changed files with 3 additions and 4 deletions

View file

@ -29,7 +29,7 @@ module UserMailerHelper
# Because we can't use stylesheets in HTML emails, we need to inline the
# styles. Rather than copy-paste the same string of CSS into every message,
# we apply it once here, after the message has been composed.
html.gsub("<p>", '<p style="color: black; margin: 0.75em 0; font-family: \'Helvetica Neue\', Arial, Sans-Serif">')
html.gsub("<p>", '<p style="color: black; margin: 0.75em 0; font-family: \'Helvetica Neue\', Arial, Sans-Serif">').html_safe
end
def style_left