From f726f40d25c5c9c19d5d7643e3b918f4b9ded05a Mon Sep 17 00:00:00 2001 From: Nicolas Bayet Date: Mon, 8 Nov 2021 10:44:53 +0000 Subject: [PATCH] [FIX] web_editor: prevent link o_default_snippet_text Whenever a link is being manipulated through the link tool, the classes are being saved before the manipulation. However, the class `o_default_snippet_text` is removed in the meantime. Because we never want that class after the manipulation, this commit systematically remove it. Task-2667983 X-original-commit: f82f004e1e1439c38a09d5eb0fded5197e058c1b Part-of: odoo/odoo#79641 --- addons/web_editor/static/src/js/wysiwyg/widgets/link.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/link.js b/addons/web_editor/static/src/js/wysiwyg/widgets/link.js index b671b798229..4807b6ced1f 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/link.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/link.js @@ -183,6 +183,7 @@ const Link = Widget.extend({ target: data.isNewWindow ? '_blank' : '', }); if (data.classes) { + data.classes = data.classes.replace(/o_default_snippet_text/, ''); attrs.class = `${data.classes}`; } if (data.rel) {