Skip to main content

Bug Tracker

Side navigation

Ticket #4920: jquery_array_arg_jsonp.patch


File jquery_array_arg_jsonp.patch, 0.5 KB (added by mmb, July 18, 2009 08:13PM UTC)

patch to allow use of data arg to $.getJSON with jsonp callback

Index: jquery/src/ajax.js
===================================================================
--- jquery/src/ajax.js	(revision 6454)
+++ jquery/src/ajax.js	(working copy)
@@ -177,7 +177,7 @@
 		// checked again later (in the test suite, specifically)
 		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
 
-		var jsonp, jsre = /=\?(&|$)/g, status, data,
+		var jsonp, jsre = /=(?:\?|%3F)(&|$)/g, status, data,
 			type = s.type.toUpperCase();
 
 		// convert data if not already a string

Download in other formats:

Original Format