a1f45aab0ecc2fc593f959725094acfe73bb21ac
In `prepend_html_content`, if body `html_body` and `html_content` are `Markup` objects, the processing of `html_content` through `re.sub` will strip away the `Markup` flag, leading to the later concatenation of the body and content first escaping the content (to safely convert it to a `Markup`) before performing the concatenation proper. As a result, the `preview` of a `mailing.mailing` would be double-escaped, and the markup hiding it would instead be printed as part of the body. Assume that the type of `html_content` is str-compatible, and immediately rewrap the value after processing it through `re.sub`. This should do nothing if `html_content` was an actual `str`, and will re-flag it as a `Markup` if it was one. Also change the finding of the insertion point to use `re.search`, I don't understand why this uses `finditer`, it just makes the code more complicated. closes odoo/odoo#71090 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%