[FIX] web_editor: support of SVG elements in snippets
Before this commit, it was not possible to save a page containing a snippet with a SVG tag. To support SVG elements, we need to use 'Element.getAttribute' and 'Element.setAttribute' as mentionned in the documentation: https://developer.mozilla.org/en-US/docs/Web/API/Element/className For more information, see GH-14485
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user