From 22449613141c5985f68a35d7ba0bc03386f28f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Debauche?= Date: Mon, 25 May 2020 07:28:19 +0000 Subject: [PATCH] [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) --- odoo/tools/mail.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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