diff options
author | jaubourg <j@ubourg.net> | 2012-04-23 00:07:15 +0200 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2012-04-23 00:07:15 +0200 |
commit | 8ad22a2b152f55b12385b126305383e2c5ba1994 (patch) | |
tree | 92d0a7576cdcaeb3481d349d5912ce3b962f6caf /src | |
parent | 8e7aaa7fd0784d1afab2e5fe7a8d347d5f3af4db (diff) | |
download | jquery-8ad22a2b152f55b12385b126305383e2c5ba1994.tar.gz jquery-8ad22a2b152f55b12385b126305383e2c5ba1994.zip |
Prevents tests for replaceInData to take place if replaceInUrl is already true.
Diffstat (limited to 'src')
-rw-r--r-- | src/ajax/jsonp.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ajax/jsonp.js b/src/ajax/jsonp.js index 6b82b8262..3e3ea85a3 100644 --- a/src/ajax/jsonp.js +++ b/src/ajax/jsonp.js @@ -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 ); |