diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-03-25 00:35:50 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-04-03 19:13:39 -0400 |
commit | 102053abd84124b1a69606565bd8da82bc5d30e9 (patch) | |
tree | 774240cc9446a8e735507fa43e5e036d7fd2f5ba /src/attributes.js | |
parent | 11cfdb23940b2c76e1104c82afc9552ac6f3dc19 (diff) | |
download | jquery-102053abd84124b1a69606565bd8da82bc5d30e9.tar.gz jquery-102053abd84124b1a69606565bd8da82bc5d30e9.zip |
Fix #7472 and added test for #3113
- Forms with an input that has either name="action" or name="some-other-attr-on-the-form" caused problems in IE6/7. This is fixed.
- Changed check in $.attr for ret === null to typeof ret === "object" to catch any inputs that are accidentally retrieved in IE6/7, since attributes cannot be set to objects and typeof null === "object"
Diffstat (limited to 'src/attributes.js')
-rw-r--r-- | src/attributes.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js index dc9a333bb..564eaeeb8 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; } |