JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2
[ckeditor.git] / _source / core / dom / element.js
index 512397e..ead6581 100644 (file)
@@ -991,8 +991,16 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype,
 \r
                removeAttributes : function ( attributes )\r
                {\r
-                       for ( var i = 0 ; i < attributes.length ; i++ )\r
-                               this.removeAttribute( attributes[ i ] );\r
+                       if ( CKEDITOR.tools.isArray( attributes ) )\r
+                       {\r
+                               for ( var i = 0 ; i < attributes.length ; i++ )\r
+                                       this.removeAttribute( attributes[ i ] );\r
+                       }\r
+                       else\r
+                       {\r
+                               for ( var attr in attributes )\r
+                                       attributes.hasOwnProperty( attr ) && this.removeAttribute( attr );\r
+                       }\r
                },\r
 \r
                /**\r