Decode html parts correctly
This commit is contained in:
parent
5ee7c066ca
commit
1a0ce4a967
2
mbox2web
2
mbox2web
|
@ -89,7 +89,7 @@ def render_body(msg):
|
|||
bodyhtml = bodytmpl.render(context)
|
||||
elif content_type == "text/html":
|
||||
htmlpart = HTMLPart()
|
||||
htmlpart.feed(msg.get_payload())
|
||||
htmlpart.feed(msg.get_payload(decode=True).decode(msg.get_charset() or "iso-8859-1"))
|
||||
bodytmpl = jenv.get_template("body_text_html.html")
|
||||
context = {
|
||||
"body": jinja2.Markup(htmlpart.as_string())
|
||||
|
|
Loading…
Reference in New Issue