Skip to main content

Bug Tracker

Side navigation

Ticket #2020: 2020-2.diff
File 2020-2.diff, 1.3 KB (added by john, December 17, 2007 12:33AM UTC)

My stab at it.

Index: test/unit/ajax.js
===================================================================
--- test/unit/ajax.js	(revision 4191)
+++ test/unit/ajax.js	(working copy)
@@ -449,7 +449,7 @@
 	$.ajax({
 		url: "data/jsonp.php",
 		dataType: "jsonp",
-		data: { callback: "?" },
+		jsonp: "callback",
 		success: function(data){
 			ok( data.data, "JSON results returned (GET, data obj callback)" );
 			plus();
@@ -492,7 +492,7 @@
 	$.ajax({
 		type: "POST",
 		url: "data/jsonp.php",
-		data: { callback: "?" },
+		jsonp: "callback",
 		dataType: "jsonp",
 		success: function(data){
 			ok( data.data, "JSON results returned (POST, data obj callback)" );
@@ -558,7 +558,7 @@
 	$.ajax({
 		url: base + "data/jsonp.php",
 		dataType: "jsonp",
-		data: { callback: "?" },
+		jsonp: "callback",
 		success: function(data){
 			ok( data.data, "JSON results returned (GET, data obj callback)" );
 			plus();
Index: src/ajax.js
===================================================================
--- src/ajax.js	(revision 4191)
+++ src/ajax.js	(working copy)
@@ -151,7 +151,7 @@
 	lastModified: {},
 
 	ajax: function( s ) {
-		var jsonp, jsre = /=(\?|%3F)/g, status, data;
+		var jsonp, jsre = /=\?/g, status, data;
 
 		// Extend the settings, but re-extend 's' so that it can be
 		// checked again later (in the test suite, specifically)

Download in other formats:

Original Format