]> source.dussan.org Git - jquery.git/commitdiff
Fixed an issue with JSON data in packed scripts. (Bug #1298)
authorJohn Resig <jeresig@gmail.com>
Sat, 16 Jun 2007 22:19:17 +0000 (22:19 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 16 Jun 2007 22:19:17 +0000 (22:19 +0000)
src/ajax/ajax.js

index 102c7f900b90263a0339624c575f435587dc2025..4fb63c0fd2c1990134278052e9fd1df0366f9e78 100644 (file)
@@ -785,7 +785,7 @@ jQuery.extend({
 
                // Get the JavaScript object, if JSON is used.
                if ( type == "json" )
-                       eval( "data = " + data );
+                       data = eval("(" + data + ")");
 
                // evaluate scripts within html
                if ( type == "html" )