Roo/htmleditor/FilterKeepChildren.js
authorAlan <alan@roojs.com>
Thu, 7 Jul 2022 02:15:53 +0000 (10:15 +0800)
committerAlan <alan@roojs.com>
Thu, 7 Jul 2022 02:15:53 +0000 (10:15 +0800)
Roo/htmleditor/FilterKeepChildren.js

index ab7054d..14989b9 100644 (file)
@@ -38,7 +38,9 @@ Roo.extend(Roo.htmleditor.FilterKeepChildren, Roo.htmleditor.FilterBlack,
                     || // array and it matches
                     (typeof(this.tag) == 'string' && this.tag == ar[i].tagName)
                     ||
-                    this.cleanNameSpace && ar[i].tagName.match(/:/)
+                    (e.tagName.indexOf(":") > -1 && typeof(this.tag) == 'object' && this.tag.indexOf(":") > -1)
+                    ||
+                    (e.tagName.indexOf(":") > -1 && typeof(this.tag) == 'string' && this.tag == ":")
                 ) {
                     this.replaceTag(ar[i]); // child is blacklisted as well...
                     continue;