aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorTimmy Willison <4timmywil@gmail.com>2016-09-12 12:32:02 -0400
committerTimmy Willison <4timmywil@gmail.com>2016-09-15 10:40:27 -0400
commit3bbcce68d7b8b8a7a2164a0f7a280ae9daf70b5c (patch)
treea65aefeef8aa62ff092254dcd5b1f2c256dc82ea /src/ajax.js
parent2d4f53416e5f74fa98e0c1d66b6f3c285a12f0ce (diff)
downloadjquery-3bbcce68d7b8b8a7a2164a0f7a280ae9daf70b5c.tar.gz
jquery-3bbcce68d7b8b8a7a2164a0f7a280ae9daf70b5c.zip
Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapse
- Renames and changes rnotwhite to focus on HTML whitespace chars - Change internal use of jQuery.trim to more accurate strip and collapse - Adds tests to ensure HTML space characters are retained where valid - Doesn't add tests where the difference is inconsequential and existing tests are adequate. Fixes gh-3003 Fixes gh-3072 Close gh-3316
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ajax.js b/src/ajax.js
index f8ec21898..36f707d7d 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -1,7 +1,7 @@
define( [
"./core",
"./var/document",
- "./var/rnotwhite",
+ "./var/rnothtmlwhite",
"./ajax/var/location",
"./ajax/var/nonce",
"./ajax/var/rquery",
@@ -11,7 +11,7 @@ define( [
"./event/trigger",
"./deferred",
"./serialize" // jQuery.param
-], function( jQuery, document, rnotwhite, location, nonce, rquery ) {
+], function( jQuery, document, rnothtmlwhite, location, nonce, rquery ) {
"use strict";
@@ -64,7 +64,7 @@ function addToPrefiltersOrTransports( structure ) {
var dataType,
i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+ dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
if ( jQuery.isFunction( func ) ) {
@@ -532,7 +532,7 @@ jQuery.extend( {
s.type = options.method || options.type || s.method || s.type;
// Extract dataTypes list
- s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+ s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
// A cross-domain request is in order when the origin doesn't match the current origin.
if ( s.crossDomain == null ) {