FIX: Do not interpret backreferences in email content

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.

diff --git a/app/helpers/email_helper.rb b/app/helpers/email_helper.rb
index 55b824d..f738ac4 100644
--- a/app/helpers/email_helper.rb
+++ b/app/helpers/email_helper.rb
@@ -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

GitHub sha: ec537e5ea203bd9a819098b5f70ebdb839cff6f3

This commit appears in #13641 which was approved by CvX. It was merged by riking.