Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148.

This commit is contained in:
timmywil 2011-05-06 13:49:20 -04:00
parent f7f8450041
commit c72b0f3256
2 changed files with 5 additions and 3 deletions

View file

@ -491,8 +491,8 @@ if ( !jQuery.support.getSetAttribute ) {
return elem.getAttribute( name );
}
ret = elem.getAttributeNode( name );
// Return undefined if not specified instead of empty string
return ret && ret.specified ?
// Return undefined if nodeValue is empty string
return ret && ret.nodeValue !== "" ?
ret.nodeValue :
undefined;
},