fixes mailgun/talon#103 keep newlines when parsing html quotations

This commit is contained in:
Sergey Obukhov
2016-08-11 20:17:37 -07:00
parent 5a9bc967f1
commit 4b953bcddc
2 changed files with 5 additions and 4 deletions

View File

@@ -391,7 +391,7 @@ def _extract_from_html(msg_body):
if msg_body.strip() == b'':
return msg_body
msg_body = msg_body.replace(b'\r\n', b'').replace(b'\n', b'')
msg_body = msg_body.replace(b'\r\n', b'\n')
html_tree = html.document_fromstring(
msg_body,
parser=html.HTMLParser(encoding="utf-8")