[FIX] web_editor: remove style of a link

Before this commit
When removing the style of a link in an html_field, the style was
not removed.

After this commit
When removing the style of a link in an html_field, the style is
removed.

task-2857072

closes odoo/odoo#92573

X-original-commit: f98c6b1ffe3a788f2da6536a109efe68cb6c2da7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Nicolas Bayet
2022-06-01 07:50:04 +02:00
parent da8def8e41
commit a53b468201
@@ -198,7 +198,7 @@ const Link = Widget.extend({
href: data.url,
target: data.isNewWindow ? '_blank' : '',
});
if (data.classes) {
if (typeof data.classes === "string") {
data.classes = data.classes.replace(/o_default_snippet_text/, '');
attrs.class = `${data.classes}`;
}