diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2020-06-10 15:49:53 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2020-06-11 06:39:11 +0000 |
| commit | eaef67323b12af1933ab73c97c62bfc94f56cf69 (patch) | |
| tree | 85cc58310bf1b2a6fd4bdb5048f2c05abc424f83 /odoo/tools/mail.py | |
| parent | edccc677aab86a8c2ef6bea42c67da8aa7d6b145 (diff) | |
[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 `<div dir="auto"></div>`).
*: 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) <nle@odoo.com>
Diffstat (limited to 'odoo/tools/mail.py')
| -rw-r--r-- | odoo/tools/mail.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
