emails: pass button link into force_str (#36515)

This commit is contained in:
Frédéric Péters 2019-11-16 21:24:46 +01:00
parent 88d47903d1
commit 82fd9489bf
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ def email(subject, mail_body, email_rcpt, replyto=None, bcc=None,
'label': match.group('label'),
'url': get_action_url(match),
}
return render_to_string('qommon/email_button_link.html', context).encode(encoding)
return force_str(render_to_string('qommon/email_button_link.html', context))
text_body = button_re.sub(text_button, text_body) if text_body else None
html_body = button_re.sub(html_button, html_body) if html_body else None