diff --git a/src/attributes.js b/src/attributes.js index dc9a333b..564eaeeb 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -320,7 +320,8 @@ jQuery.extend({ ret = elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined - return ret === null || ret === "null" ? + // Instead of checking for null, we check for typeof object to catch inputs in IE6/7. Bug #7472 + return typeof ret === "object" || ret === "null" ? undefined : ret; } diff --git a/test/index.html b/test/index.html index c7c2ae55..4a8aef52 100644 --- a/test/index.html +++ b/test/index.html @@ -203,6 +203,7 @@ Z +