Side navigation
Ticket #2733: patch_httpData.txt
File patch_httpData.txt, 0.6 KB (added by derencius, May 30, 2008 02:27PM UTC)
a simple patch. tests are needed
Index: src/ajax.js
===================================================================
--- src/ajax.js (revision 5709)
+++ src/ajax.js (working copy)
@@ -473,11 +473,11 @@
data = filter( data, type );
// If the type is "script", eval it in global context
- if ( type == "script" )
+ if ( type == "script" || (ct && ct.indexOf("javascript") >= 0 ))
jQuery.globalEval( data );
// Get the JavaScript object, if JSON is used.
- if ( type == "json" )
+ if ( type == "json" || (ct && ct.indexOf("json") >= 0 ))
data = eval("(" + data + ")");
return data;
Download in other formats:
Original Format
File patch_httpData.txt, 0.6 KB (added by derencius, May 30, 2008 02:27PM UTC)
a simple patch. tests are needed
Index: src/ajax.js
===================================================================
--- src/ajax.js (revision 5709)
+++ src/ajax.js (working copy)
@@ -473,11 +473,11 @@
data = filter( data, type );
// If the type is "script", eval it in global context
- if ( type == "script" )
+ if ( type == "script" || (ct && ct.indexOf("javascript") >= 0 ))
jQuery.globalEval( data );
// Get the JavaScript object, if JSON is used.
- if ( type == "json" )
+ if ( type == "json" || (ct && ct.indexOf("json") >= 0 ))
data = eval("(" + data + ")");
return data;