diff options
| author | Stéphane Debauche <std@odoo.com> | 2020-05-25 07:28:19 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-05-25 07:28:19 +0000 |
| commit | 22449613141c5985f68a35d7ba0bc03386f28f96 (patch) | |
| tree | 5131105edc1a6e2d63561b7fb43754b9513dc82a /odoo/tools/mail.py | |
| parent | a19684af955b6cfecbacfb75078b8411b7a82a60 (diff) | |
[IMP] mail,tools: clean tags to kill list in HTML sanitizer
Some tags are not necessary in the HTML template and we can remove them to
have a proper HTML output.
Task 2171753
closes odoo/odoo#51757
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'odoo/tools/mail.py')
| -rw-r--r-- | odoo/tools/mail.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index fd40244500c..9c57c28e3dc 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -26,7 +26,9 @@ _logger = logging.getLogger(__name__) # HTML Sanitizer #---------------------------------------------------------- -tags_to_kill = ["script", "head", "meta", "title", "link", "style", "frame", "iframe", "base", "object", "embed"] +tags_to_kill = ['base', 'embed', 'frame', 'head', 'iframe', 'link', 'meta', + 'noscript', 'object', 'script', 'style', 'title'] + tags_to_remove = ['html', 'body'] # allow new semantic HTML5 tags |
