Fixes #5812. =? will be detected even when it has been escaped during data serialization.
[jquery.git] / test / unit / ajax.js
index d849cff..773088f 100644 (file)
@@ -1081,7 +1081,7 @@ test("jQuery.getScript(String, Function) - no callback", function() {
 });
 
 test("jQuery.ajax() - JSONP, Local", function() {
-       expect(9);
+       expect(10);
 
        var count = 0;
        function plus(){ if ( ++count == 9 ) start(); }
@@ -1131,6 +1131,22 @@ test("jQuery.ajax() - JSONP, Local", function() {
        jQuery.ajax({
                url: "data/jsonp.php",
                dataType: "jsonp",
+               data: {
+                       callback: "?"
+               },
+               success: function(data){
+                       ok( data.data, "JSON results returned (GET, processed data callback)" );
+                       plus();
+               },
+               error: function(data){
+                       ok( false, "Ajax error JSON (GET, processed data callback)" );
+                       plus();
+               }
+       });
+
+       jQuery.ajax({
+               url: "data/jsonp.php",
+               dataType: "jsonp",
                jsonp: "callback",
                success: function(data){
                        ok( data.data, "JSON results returned (GET, data obj callback)" );