[FIX] tools: nbsp html character
Current behaviour: When sending an email from Odoo, can be seen in plaintext. Steps to reproduce: 1. Install sale_management 2. Head over to Sales > Quotations 3. Create a new quotation 4. Enter a partner 5. Click on Send by email 6. [...] S00021 amounting in $ 12.00 [...] Fix: When parsing to plaintext, replacing html character by unicode character opw-3389602 closes odoo/odoo#132203 X-original-commit: 3e3f1e67dd5894a41c830344ed41c91a5e44159e Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
This commit is contained in:
@@ -392,6 +392,7 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
|
||||
html = html.replace('>', '>')
|
||||
html = html.replace('<', '<')
|
||||
html = html.replace('&', '&')
|
||||
html = html.replace(' ', '\N{NO-BREAK SPACE}')
|
||||
|
||||
# strip all lines
|
||||
html = '\n'.join([x.strip() for x in html.splitlines()])
|
||||
|
||||
Reference in New Issue
Block a user