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 102c7f9..4fb63c0 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" )