Fixed use of eval() and new Function() to work within the correct scope (and not...
[jquery.git] / src / jquery / jquery.js
index 7c0562a..9bcec93 100644 (file)
@@ -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 = [];