Do not pass signature in plaintext to renderer

This commit is contained in:
Raphael Michel
2018-08-16 13:48:37 +02:00
parent 185cf90d4c
commit efdbbc6098

View File

@@ -86,7 +86,7 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
'invoice_company': ''
})
renderer = ClassicMailRenderer(None)
body_plain = render_mail(template, context)
content_plain = body_plain = render_mail(template, context)
subject = str(subject).format_map(context)
sender = sender or (event.settings.get('mail_from') if event else settings.MAIL_FROM)
if event:
@@ -138,7 +138,7 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
body_plain += "\r\n"
try:
body_html = renderer.render(body_plain, signature, str(subject), order)
body_html = renderer.render(content_plain, signature, str(subject), order)
except:
logger.exception('Could not render HTML body')
body_html = None