[MERGE] [FIX] tools: mail: html2plaintext better manages carriage returns.
lp bug: https://launchpad.net/bugs/1159782 fixed bzr revid: tde@openerp.com-20130403083237-a406615qs8pe1jon
This commit is contained in:
@@ -185,6 +185,8 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
|
||||
url_index.append(url)
|
||||
|
||||
html = ustr(etree.tostring(tree, encoding=encoding))
|
||||
# \r char is converted into , must remove it
|
||||
html = html.replace(' ', '')
|
||||
|
||||
html = html.replace('<strong>', '*').replace('</strong>', '*')
|
||||
html = html.replace('<b>', '*').replace('</b>', '*')
|
||||
|
||||
Reference in New Issue
Block a user