Commit 6fdbb792 authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup! erp5_interface_post: sent Mail Message now display their post equivalent as preview

parent 44908048
...@@ -9,17 +9,9 @@ import email ...@@ -9,17 +9,9 @@ import email
message = email.message_from_string(data) message = email.message_from_string(data)
payload = message.get_payload() payload = message.get_payload(decode=True)
while isinstance(payload, list): while isinstance(payload, list):
payload = payload[0].get_payload() payload = payload[0].get_payload(decode=True)
def escapeMessage(message): return payload
"""
An Internet Mail Message has a line length limit, and truncated lines
are added "=" at the end. Thus, other "=" in the payloads are escaped
to "=3D"
"""
return message.replace('=\n', '').replace('=3D', '=')
return escapeMessage(payload)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment