aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax/load.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/load.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/load.js')
-rw-r--r--src/ajax/load.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ajax/load.js b/src/ajax/load.js
index 1058dbf52..3ce3a5aae 100644
--- a/src/ajax/load.js
+++ b/src/ajax/load.js
@@ -1,11 +1,12 @@
define( [
"../core",
+ "../core/stripAndCollapse",
"../core/parseHTML",
"../ajax",
"../traversing",
"../manipulation",
"../selector"
-], function( jQuery ) {
+], function( jQuery, stripAndCollapse ) {
"use strict";
@@ -18,7 +19,7 @@ jQuery.fn.load = function( url, params, callback ) {
off = url.indexOf( " " );
if ( off > -1 ) {
- selector = jQuery.trim( url.slice( off ) );
+ selector = stripAndCollapse( url.slice( off ) );
url = url.slice( 0, off );
}