[FIX] tools: mail: fixed last commit, solving an issue with the html2plaintext introduced another issue with notes. Reverting to the first version.

This commit is contained in:
Thibault Delavallée 2014-07-11 15:31:44 +02:00
parent 50b48e0d13
commit 7a928b151a
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
html = html.replace('&lt;', '<')
# strip all lines
html = ''.join([x.strip() for x in html.splitlines(True)])
html = '\n'.join([x.strip() for x in html.splitlines()])
html = html.replace('\n' * 2, '\n')
for i, url in enumerate(url_index):
if i == 0: