Skip to content
Permalink
Browse files

Fixes #8054 by reverting feature enhancement 5812 (4920). Regexps no …

…longer searches for %3F in url or data to find jsonp callback placeholders.
  • Loading branch information
jaubourg committed Jan 25, 2011
1 parent 5ca8f06 commit 325dcdc2ab05173f809b9d83af59918b3695cc23
Showing with 3 additions and 20 deletions.
  1. +1 −1 src/ajax/jsonp.js
  2. +2 −19 test/unit/ajax.js
@@ -1,7 +1,7 @@
(function( jQuery ) {

var jsc = jQuery.now(),
jsre = /(\=)(?:\?|%3F)(&|$)|()(?:\?\?|%3F%3F)()/i;
jsre = /(\=)\?(&|$)|()\?\?()/i;

// Default jsonp settings
jQuery.ajaxSetup({
@@ -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",

0 comments on commit 325dcdc

Please sign in to comment.
You can’t perform that action at this time.