Decode text/plain correctly

This commit is contained in:
Peter J. Holzer 2019-03-01 11:57:55 +01:00
parent 23a6ea4716
commit fbce052c69
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def render_body(msg):
if content_type == "text/plain":
bodytmpl = jenv.get_template("body_text_plain.html")
context = {
"body": msg.get_payload()
"body": msg.get_payload(decode=True).decode(msg.get_charset() or "iso-8859-1")
}
bodyhtml = bodytmpl.render(context)
elif content_type == "multipart/mixed":