From 7a928b151a4b9422f4198ec167ffca135aae3f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= <tde@openerp.com> Date: Fri, 11 Jul 2014 15:31:44 +0200 Subject: [PATCH] [FIX] tools: mail: fixed last commit, solving an issue with the html2plaintext introduced another issue with notes. Reverting to the first version. --- openerp/tools/mail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/tools/mail.py b/openerp/tools/mail.py index 7e2c79800bd8..425a7ff9c7dc 100644 --- a/openerp/tools/mail.py +++ b/openerp/tools/mail.py @@ -215,7 +215,8 @@ def html2plaintext(html, body_id=None, encoding='utf-8'): html = html.replace('<', '<') # 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: -- GitLab