Fixed use of eval() and new Function() to work within the correct scope (and not throw errors).

This commit is contained in:
John Resig 2007-08-22 06:19:22 +00:00
parent fc3e180465
commit f2f399dcd5
2 changed files with 3 additions and 3 deletions

View file

@ -405,7 +405,7 @@ jQuery.extend({
f = jQuery.expr[m[1]][m[2]];
// Build a custom macro to enclose it
eval("f = function(a,i){return " + f + "}");
f = eval("false||function(a,i){return " + f + "}");
// Execute it against the current filter
r = jQuery.grep( r, f, not );