From eaef67323b12af1933ab73c97c62bfc94f56cf69 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 10 Jun 2020 15:49:53 +0000 Subject: [PATCH] [FIX] tools: add bdi tag as safe tag We already have BDO tag as allowed tag in sanitized HTML that is similar to BDI tag, so this commit also adds BDI in allowed tags. BDI* tags make sense in email since email client can have different orientation than Odoo (alternative is to use `
`). *: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi opw-2256982 closes #52787 closes odoo/odoo#52801 X-original-commit: 68edebb0d862acb3dc14f839aaef744306c5e269 Signed-off-by: Nicolas Lempereur (nle) --- odoo/tools/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index 9c57c28e3dc..6e552a6962d 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -32,7 +32,7 @@ tags_to_kill = ['base', 'embed', 'frame', 'head', 'iframe', 'link', 'meta', tags_to_remove = ['html', 'body'] # allow new semantic HTML5 tags -allowed_tags = clean.defs.tags | frozenset('article section header footer hgroup nav aside figure main'.split() + [etree.Comment]) +allowed_tags = clean.defs.tags | frozenset('article bdi section header footer hgroup nav aside figure main'.split() + [etree.Comment]) safe_attrs = clean.defs.safe_attrs | frozenset( ['style', 'data-o-mail-quote', # quote detection