diff options
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ajax.js b/src/ajax.js index efc413650..289eb2795 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -12,6 +12,7 @@ define( [ ], function( jQuery, document, rnotwhite, location, nonce, rquery ) { var + r20 = /%20/g, rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, @@ -601,6 +602,11 @@ jQuery.extend( { // Otherwise add one to the end cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; } + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. |