mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
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:
parent
371fba6ae0
commit
ec537e5ea2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user