diff --git a/addons/web_editor/static/src/js/rte.js b/addons/web_editor/static/src/js/rte.js index 37b87553506..c3a88007542 100644 --- a/addons/web_editor/static/src/js/rte.js +++ b/addons/web_editor/static/src/js/rte.js @@ -364,8 +364,8 @@ var RTE = Widget.extend({ var $el = $(this); $el.find('[class]').filter(function () { - if (!this.className.match(/\S/)) { - this.removeAttribute("class"); + if (!this.getAttribute('class').match(/\S/)) { + this.removeAttribute('class'); } });