[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) <dmo@odoo.com>
This commit is contained in:
vishal padhiyar
2022-11-03 19:40:55 +01:00
committed by Hiral Bhavsar
parent 2994a3da0d
commit e774cac767
@@ -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');