]> source.dussan.org Git - jquery.git/commitdiff
Prevents tests for replaceInData to take place if replaceInUrl is already true.
authorjaubourg <j@ubourg.net>
Sun, 22 Apr 2012 22:07:15 +0000 (00:07 +0200)
committerjaubourg <j@ubourg.net>
Sun, 22 Apr 2012 22:07:15 +0000 (00:07 +0200)
src/ajax/jsonp.js

index 6b82b8262626f76b7a85ff637750769f49b61f60..3e3ea85a3eb67f60bc0570e2747d5bff7389c667 100644 (file)
@@ -23,7 +23,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
                url = s.url,
                hasCallback = s.jsonp !== false,
                replaceInUrl = hasCallback && rjsonp.test( url ),
-               replaceInData = hasCallback && typeof data === "string" &&
+               replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
                        !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
                        rjsonp.test( data );