Permalink
Browse files

Fixes #4624... 3 years later, people!

  • Loading branch information...
1 parent d3fad51 commit bd56456b1e886c7b03211212ac3c0a6a310b5cde @jaubourg jaubourg committed Mar 7, 2012
Showing with 2 additions and 3 deletions.
  1. +1 −1 src/ajax.js
  2. +1 −2 src/ajax/jsonp.js
View
@@ -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,
/*
View
@@ -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 ) ||

0 comments on commit bd56456

Please sign in to comment.