From e774cac767ef0c202bcb271d691ada7a9ce6c233 Mon Sep 17 00:00:00 2001 From: vishal padhiyar Date: Mon, 17 Oct 2022 13:15:34 +0000 Subject: [PATCH] [FIX] web_editor: fix attributes missing from cleanForSave Before this commit: When we try to add html data in translated email templates then it does not remove those extra classes from the html code. After this commit: Now those extra classes will remove from the html code. Task-2985072 closes odoo/odoo#104859 X-original-commit: 5e192a3ccd93c3aafda26abdcfae50ab8f0e053e Signed-off-by: David Monjoie (dmo) --- addons/web_editor/static/src/js/backend/QWebPlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/backend/QWebPlugin.js b/addons/web_editor/static/src/js/backend/QWebPlugin.js index 709ebc689ae..f6b316dc0a6 100644 --- a/addons/web_editor/static/src/js/backend/QWebPlugin.js +++ b/addons/web_editor/static/src/js/backend/QWebPlugin.js @@ -26,7 +26,8 @@ export class QWebPlugin { } } cleanForSave(editable) { - for (const node of editable.querySelectorAll('[data-oe-t-group]')) { + for (const node of editable.querySelectorAll('[data-oe-t-group], [data-oe-t-inline], [data-oe-t-selectable], [data-oe-t-group-active]')) { + node.removeAttribute('data-oe-t-group-active'); node.removeAttribute('data-oe-t-group'); node.removeAttribute('data-oe-t-inline'); node.removeAttribute('data-oe-t-selectable');