aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-18 19:36:35 -0500
committerjeresig <jeresig@gmail.com>2009-12-18 19:36:35 -0500
commit67b3be24e1215609cca524ee8158fc7e6e80db93 (patch)
treea06ec36934be0a8a7a75c1c59a6bba0e3ad6a1d9
parent5e811146ee34fde5fa60e142e7ee4422e2748024 (diff)
downloadjquery-67b3be24e1215609cca524ee8158fc7e6e80db93.tar.gz
jquery-67b3be24e1215609cca524ee8158fc7e6e80db93.zip
Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still letting those pass through. Fixes #5669.
-rw-r--r--src/core.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js
index 0c0d5a2e1..67b4574be 100644
--- a/src/core.js
+++ b/src/core.js
@@ -433,7 +433,8 @@ jQuery.extend({
isPlainObject: function( obj ) {
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
- if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) ) {
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) || obj.nodeType || obj.setInterval ) {
return false;
}