diff options
author | Oleg <markelog@gmail.com> | 2011-11-13 12:10:21 +0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-11-14 11:30:53 -0500 |
commit | a467aa0a779b8741581cc2ab1fcd914f5718f5c8 (patch) | |
tree | 9d08e1d02b4e1c2af138c5b23d4b3e624e0a75ab /src/attributes.js | |
parent | fa96f4bdeedd5b134ea1923e1147b4282fa4d6fa (diff) | |
download | jquery-a467aa0a779b8741581cc2ab1fcd914f5718f5c8.tar.gz jquery-a467aa0a779b8741581cc2ab1fcd914f5718f5c8.zip |
Fix #10773. Improve parameter handling in removeAttr.
Diffstat (limited to 'src/attributes.js')
-rw-r--r-- | src/attributes.js | 6 |
1 files changed, 3 insertions, 3 deletions
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) |