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

index 29b62dd..15b6476 100644 (file)
@@ -32,11 +32,12 @@ Roo.extend(Roo.htmleditor.FilterKeepChildren, Roo.htmleditor.FilterBlack,
         //remove first..
         
         for (var i = 0; i < ar.length; i++) {
-            if (ar[i].nodeType == 1) {
+            var e = ar[i];
+            if (e.nodeType == 1) {
                 if (
-                    (typeof(this.tag) == 'object' && this.tag.indexOf(ar[i].tagName) > -1)
+                    (typeof(this.tag) == 'object' && this.tag.indexOf(e.tagName) > -1)
                     || // array and it matches
-                    (typeof(this.tag) == 'string' && this.tag == ar[i].tagName)
+                    (typeof(this.tag) == 'string' && this.tag == e.tagName)
                     ||
                     (e.tagName.indexOf(":") > -1 && typeof(this.tag) == 'object' && this.tag.indexOf(":") > -1)
                     ||