Decode text/plain correctly
This commit is contained in:
parent
23a6ea4716
commit
fbce052c69
2
mbox2web
2
mbox2web
|
@ -54,7 +54,7 @@ def render_body(msg):
|
||||||
if content_type == "text/plain":
|
if content_type == "text/plain":
|
||||||
bodytmpl = jenv.get_template("body_text_plain.html")
|
bodytmpl = jenv.get_template("body_text_plain.html")
|
||||||
context = {
|
context = {
|
||||||
"body": msg.get_payload()
|
"body": msg.get_payload(decode=True).decode(msg.get_charset() or "iso-8859-1")
|
||||||
}
|
}
|
||||||
bodyhtml = bodytmpl.render(context)
|
bodyhtml = bodytmpl.render(context)
|
||||||
elif content_type == "multipart/mixed":
|
elif content_type == "multipart/mixed":
|
||||||
|
|
Loading…
Reference in New Issue