From 866ee94791b017a6e00d9d1e86fbbe5165a1b76a Mon Sep 17 00:00:00 2001 From: Stanislas Gueniffey Date: Thu, 16 Feb 2023 14:58:45 +0000 Subject: [PATCH] [FIX] web_editor: allow html if data-oe-type=html The `isHtmlContentSupported` function incorrectly returned `false` for elements inside `data-oe-type="html"` nodes even though those in fact do support html. task-3184150 X-original-commit: 7d9a040fdefa527ace3150e39a03b833024b7973 Part-of: odoo/odoo#113908 --- .../static/src/js/editor/odoo-editor/src/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js index 7df91386465..6df5bf03ef2 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/utils/utils.js @@ -1496,7 +1496,7 @@ export function getOuid(node, optimize = false) { * @returns {boolean} */ export function isHtmlContentSupported(node) { - return !closestElement(node, '[data-oe-model]:not([data-oe-field="arch"]),[data-oe-translation-id]', true); + return !closestElement(node, '[data-oe-model]:not([data-oe-field="arch"]):not([data-oe-type="html"]),[data-oe-translation-id]', true); } /** * Returns whether the given node is a element that could be considered to be