Skip to main content

Bug Tracker

Side navigation

Ticket #3565: httpData.patch


File httpData.patch, 0.7 KB (added by robman, November 02, 2008 12:38AM UTC)

DIFF against 1.2.6 from svn

DIFF against 1.2.6 from svn:
Index: src/ajax.js
===================================================================
--- src/ajax.js (revision 5918)
+++ src/ajax.js (working copy)
@@ -478,9 +478,12 @@
 
                // Get the JavaScript object, if JSON is used.
                if ( type == "json" )
-                       data = eval("(" + data + ")");
-
-               return data;
+                       // Check to make sure the JSON returned evaluates correctly
+                       try {
+                               data = eval("(" + data + ")");
+                               return data;
+                       } catch(e) {}
+                       return false;
        },
 
        // Serialize an array of form elements or a set of

Download in other formats:

Original Format