[IMP] tools: keep additional data when sanitizing
Purpose is to allow to have ``data-behavior-props`` and ``data-prop-name`` on HTML nodes and keep it even when HTML content is sanitized. Those attributes will be used notably in Knowledge application to store some structured content e.g. used to populate props. Prepares Task-2796156 Prepares odoo/enterprise#29423 X-original-commit: 7ddb4685567c115ca4e14fa7e5f845b0cb33fd7c Part-of: odoo/odoo#101694
This commit is contained in:
committed by
Thibault Delavallée
parent
7871c75f75
commit
1f6005070f
@@ -35,6 +35,7 @@ safe_attrs = clean.defs.safe_attrs | frozenset(
|
||||
'data-publish', 'data-id', 'data-res_id', 'data-interval', 'data-member_id', 'data-scroll-background-ratio', 'data-view-id',
|
||||
'data-class', 'data-mimetype', 'data-original-src', 'data-original-id', 'data-gl-filter', 'data-quality', 'data-resize-width',
|
||||
'data-shape', 'data-shape-colors', 'data-file-name', 'data-original-mimetype',
|
||||
'data-behavior-props', 'data-prop-name', # knowledge commands
|
||||
])
|
||||
SANITIZE_TAGS = {
|
||||
# allow new semantic HTML5 tags
|
||||
|
||||
Reference in New Issue
Block a user