Commit 8ad22a2b authored by jaubourg's avatar jaubourg

Prevents tests for replaceInData to take place if replaceInUrl is already true.

parent 8e7aaa7f
...@@ -23,7 +23,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { ...@@ -23,7 +23,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
url = s.url, url = s.url,
hasCallback = s.jsonp !== false, hasCallback = s.jsonp !== false,
replaceInUrl = hasCallback && rjsonp.test( url ), replaceInUrl = hasCallback && rjsonp.test( url ),
replaceInData = hasCallback && typeof data === "string" && replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
!( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
rjsonp.test( data ); rjsonp.test( data );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment