mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 04:24:39 +08: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:
@ -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
|
||||
|
Reference in New Issue
Block a user