From a467aa0a779b8741581cc2ab1fcd914f5718f5c8 Mon Sep 17 00:00:00 2001 From: Oleg Date: Sun, 13 Nov 2011 12:10:21 +0400 Subject: Fix #10773. Improve parameter handling in removeAttr. --- src/attributes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/attributes.js b/src/attributes.js index b7c1f4a82..08bec5847 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -355,12 +355,12 @@ jQuery.extend({ var propName, attrNames, name, l, i = 0; - if ( elem.nodeType === 1 ) { - attrNames = ( value || "" ).split( rspace ); + if ( value && typeof value === "string" && elem.nodeType === 1 ) { + attrNames = jQuery.trim( value ).toLowerCase().split( " " ); l = attrNames.length; for ( ; i < l; i++ ) { - name = attrNames[ i ].toLowerCase(); + name = attrNames[ i ]; propName = jQuery.propFix[ name ] || name; // See #9699 for explanation of this approach (setting first, then removal) -- cgit v1.2.3