Fix #11547. toLowerCase not work good on XML attributes.

This was fixed to some extent in gh-724 but there were insufficient test cases. Removing the lowercase completely allows IE 6/7 to work properly since there you need an exact case match for attributes, even in HTML docs. More discussion and test cases in the comments on gh-724.
This commit is contained in:
Dave Methvin
2012-07-11 22:46:34 -04:00
parent 0bde43aeee
commit f4e5c1729a
3 changed files with 29 additions and 22 deletions

View File

@@ -338,19 +338,14 @@ jQuery.extend({
},
removeAttr: function( elem, value ) {
var propName, attrNames, name, l, isBool,
var propName, attrNames, name, isBool,
i = 0;
if ( value && elem.nodeType === 1 ) {
if ( !jQuery.isXMLDoc( elem ) ) {
value = value.toLowerCase();
}
attrNames = value.split( core_rspace );
l = attrNames.length;
for ( ; i < l; i++ ) {
for ( ; i < attrNames.length; i++ ) {
name = attrNames[ i ];
if ( name ) {