From 82265c52ca6e861275a6f2e4e0117a102a907a5d Mon Sep 17 00:00:00 2001 From: "Walid HANNICHE (waha)" Date: Mon, 5 Sep 2022 08:58:06 +0000 Subject: [PATCH] [FIX] tools: fix underline and italic in logged notes Steps to reproduce: - in any app log a note using full composer - add styles to the text (underline, strike-through, italic) Bug: styles except bold are removed Fix: added missing styles to the whitlelist opw-2956374 closes odoo/odoo#102056 X-original-commit: eb07ab104d5f47574e14db811108a7d0cbbbe4b2 Signed-off-by: David Monjoie (dmo) --- odoo/tools/mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index 48b26a58a8e..b27b6e707a3 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -51,8 +51,8 @@ class _Cleaner(clean.Cleaner): _style_re = re.compile(r'''([\w-]+)\s*:\s*((?:[^;"']|"[^";]*"|'[^';]*')+)''') _style_whitelist = [ - 'font-size', 'font-family', 'font-weight', 'background-color', 'color', 'text-align', - 'line-height', 'letter-spacing', 'text-transform', 'text-decoration', 'opacity', + 'font-size', 'font-family', 'font-weight', 'font-style', 'background-color', 'color', 'text-align', + 'line-height', 'letter-spacing', 'text-transform', 'text-decoration', 'text-decoration', 'opacity', 'float', 'vertical-align', 'display', 'padding', 'padding-top', 'padding-left', 'padding-bottom', 'padding-right', 'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right',