[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>
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user