aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2012-03-07 17:08:59 +0100
committerjaubourg <j@ubourg.net>2012-03-07 17:08:59 +0100
commitbd56456b1e886c7b03211212ac3c0a6a310b5cde (patch)
tree27a9a3fa316fe01187a1a46511dcd5116d5b593b
parentd3fad51cad1f71bd20beba81b51552295721a5a5 (diff)
downloadjquery-bd56456b1e886c7b03211212ac3c0a6a310b5cde.tar.gz
jquery-bd56456b1e886c7b03211212ac3c0a6a310b5cde.zip
Fixes #4624... 3 years later, people!
-rw-r--r--src/ajax.js2
-rw-r--r--src/ajax/jsonp.js3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 407a514ab..2bcc1d0a2 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -315,7 +315,7 @@ jQuery.extend({
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
type: "GET",
- contentType: "application/x-www-form-urlencoded",
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: true,
async: true,
/*
diff --git a/src/ajax/jsonp.js b/src/ajax/jsonp.js
index 6b0f95d5b..e1f2b5314 100644
--- a/src/ajax/jsonp.js
+++ b/src/ajax/jsonp.js
@@ -14,8 +14,7 @@ jQuery.ajaxSetup({
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
- var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
- ( typeof s.data === "string" );
+ var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
if ( s.dataTypes[ 0 ] === "jsonp" ||
s.jsonp !== false && ( jsre.test( s.url ) ||