]> source.dussan.org Git - jquery.git/commitdiff
Fixes #8054 by reverting feature enhancement 5812 (4920). Regexps no longer searches...
authorjaubourg <j@ubourg.net>
Tue, 25 Jan 2011 23:55:39 +0000 (00:55 +0100)
committerjaubourg <j@ubourg.net>
Tue, 25 Jan 2011 23:55:39 +0000 (00:55 +0100)
src/ajax/jsonp.js
test/unit/ajax.js

index f5742d998bd6bb6069c28a815214abaa255b27bc..16a4c2fd2e554c58101b8985ff4ec25f6da5023a 100644 (file)
@@ -1,7 +1,7 @@
 (function( jQuery ) {
 
 var jsc = jQuery.now(),
-       jsre = /(\=)(?:\?|%3F)(&|$)|()(?:\?\?|%3F%3F)()/i;
+       jsre = /(\=)\?(&|$)|()\?\?()/i;
 
 // Default jsonp settings
 jQuery.ajaxSetup({
index d01837239b01455de6bfe0226444c165ac2fb081..abe90c88ea17b9d7eb7c0b559d2812c1412d7775 100644 (file)
@@ -1199,10 +1199,10 @@ test("jQuery.getScript(String, Function) - no callback", function() {
 jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label ) {
 
        test("jQuery.ajax() - JSONP, " + label, function() {
-               expect(17);
+               expect(16);
 
                var count = 0;
-               function plus(){ if ( ++count == 17 ) start(); }
+               function plus(){ if ( ++count == 16 ) start(); }
 
                stop();
 
@@ -1306,23 +1306,6 @@ jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label )
                        }
                });
 
-               jQuery.ajax({
-                       url: "data/jsonp.php",
-                       dataType: "jsonp",
-                       crossDomain: crossDomain,
-                       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",