aboutsummaryrefslogtreecommitdiffstats
path: root/src/jquery/jquery.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-08-22 06:19:22 +0000
committerJohn Resig <jeresig@gmail.com>2007-08-22 06:19:22 +0000
commitf2f399dcd552e73f68c9e8adfe26ef7995724cb3 (patch)
tree2eb7e62c4464256c51797048c5469c1c3296d713 /src/jquery/jquery.js
parentfc3e180465a88558321b6550ac4692d7cc4b281f (diff)
downloadjquery-f2f399dcd552e73f68c9e8adfe26ef7995724cb3.tar.gz
jquery-f2f399dcd552e73f68c9e8adfe26ef7995724cb3.zip
Fixed use of eval() and new Function() to work within the correct scope (and not throw errors).
Diffstat (limited to 'src/jquery/jquery.js')
-rw-r--r--src/jquery/jquery.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 7c0562aaf..9bcec930f 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -1857,7 +1857,7 @@ jQuery.extend({
// If a string is passed in for the function, make a function
// for it (a handy shortcut)
if ( typeof fn == "string" )
- fn = eval("function(a,i){return " + fn + "}");
+ fn = eval("false||function(a,i){return " + fn + "}");
var result = [];
@@ -1911,7 +1911,7 @@ jQuery.extend({
// If a string is passed in for the function, make a function
// for it (a handy shortcut)
if ( typeof fn == "string" )
- fn = eval("function(a){return " + fn + "}");
+ fn = eval("false||function(a){return " + fn + "}");
var result = [];