Fixes #5812. =? will be detected even when it has been escaped during data serialization.
This commit is contained in:
parent
62a1a1a8fa
commit
8c8bd3bf6a
2 changed files with 18 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
(function( jQuery ) {
|
(function( jQuery ) {
|
||||||
|
|
||||||
var jsc = jQuery.now(),
|
var jsc = jQuery.now(),
|
||||||
jsre = /\=\?(&|$)/,
|
jsre = /\=(?:\?|%3F)(&|$)/i,
|
||||||
rquery_jsonp = /\?/;
|
rquery_jsonp = /\?/;
|
||||||
|
|
||||||
// Default jsonp settings
|
// Default jsonp settings
|
||||||
|
|
|
@ -1081,7 +1081,7 @@ test("jQuery.getScript(String, Function) - no callback", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("jQuery.ajax() - JSONP, Local", function() {
|
test("jQuery.ajax() - JSONP, Local", function() {
|
||||||
expect(9);
|
expect(10);
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
function plus(){ if ( ++count == 9 ) start(); }
|
function plus(){ if ( ++count == 9 ) start(); }
|
||||||
|
@ -1128,6 +1128,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({
|
jQuery.ajax({
|
||||||
url: "data/jsonp.php",
|
url: "data/jsonp.php",
|
||||||
dataType: "jsonp",
|
dataType: "jsonp",
|
||||||
|
|
Loading…
Add table
Reference in a new issue