Skip to content

Commit bd56456

Browse files
committed
Fixes jquery#4624... 3 years later, people!
1 parent d3fad51 commit bd56456

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ jQuery.extend({
315315
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
316316
global: true,
317317
type: "GET",
318-
contentType: "application/x-www-form-urlencoded",
318+
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
319319
processData: true,
320320
async: true,
321321
/*

src/ajax/jsonp.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jQuery.ajaxSetup({
1414
// Detect, normalize options and install callbacks for jsonp requests
1515
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
1616

17-
var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
18-
( typeof s.data === "string" );
17+
var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
1918

2019
if ( s.dataTypes[ 0 ] === "jsonp" ||
2120
s.jsonp !== false && ( jsre.test( s.url ) ||

0 commit comments

Comments
 (0)