FIX: Do not interpret backreferences in email content

This changes from providing a string literal for the #sub replacement, to providing a block.
Because the block is provided the match object, it is presumed to have already performed all necessary backreferences.
This avoids any replacement of backreferences in the message body.
This commit is contained in:
Kane York 2021-07-05 13:40:52 -07:00 committed by Kane York
parent 371fba6ae0
commit ec537e5ea2

View File

@ -27,7 +27,7 @@ module EmailHelper
def email_html_template
EmailStyle.new.html
.sub('%{email_content}', capture { yield })
.sub('%{email_content}') { capture { yield } }
.gsub('%{html_lang}', html_lang)
.html_safe
end