1
0

Fix plain text rendering

This commit is contained in:
Tim Kächele 2020-12-07 18:49:56 +01:00
parent 5018fc4fe6
commit 02582f0977

View File

@ -72,10 +72,12 @@ class CreateEmail
def render_plaintext(template_version, personalization) def render_plaintext(template_version, personalization)
if template_version['generate_plain_content'] if template_version['generate_plain_content']
document = Nokogiri::HTML(render_html(template_version, personalization)) document = Nokogiri::HTML(render_html(template_version,
personalization['dynamic_template_data']))
document.text() document.text()
else else
handlebars_renderer.render(template_version['plain_content'], personalization) handlebars_renderer.render(template_version['plain_content'],
personalization['dynamic_template_data'])
end end
end end