Roo/htmleditor/FilterEmpty.js
authorleon <leon@roojs.com>
Mon, 26 Feb 2024 09:23:37 +0000 (17:23 +0800)
committerleon <leon@roojs.com>
Mon, 26 Feb 2024 09:23:37 +0000 (17:23 +0800)
Roo/htmleditor/FilterEmpty.js

index 9eca059..31a6d1e 100644 (file)
@@ -23,7 +23,7 @@ Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
         if(!['B', 'I', 'U', 'S'].includes(node.tagName)) {
             return false;
         }
-        if (node.attributes && node.attributes.length > 0 && node.childNodes.length == 0) {
+        if (node.attributes && node.attributes.length > 0 || node.childNodes.length > 0) {
             return false; // walk if there are any.
         }
         Roo.htmleditor.FilterBlack.prototype.replaceTag.call(this, node);