From 82fd9489bfdb8e302cd565a28c23865882634c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 16 Nov 2019 21:24:46 +0100 Subject: [PATCH] emails: pass button link into force_str (#36515) --- wcs/qommon/emails.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcs/qommon/emails.py b/wcs/qommon/emails.py index 6e73180c9..0562facc5 100644 --- a/wcs/qommon/emails.py +++ b/wcs/qommon/emails.py @@ -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