diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2012-12-17 16:56:36 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-12-26 13:34:36 -0500 |
commit | 25d933909b7ff2e1bdb330667c81e50a5eef5505 (patch) | |
tree | 6d74a2003061f5b0e54d2947618a68df9fdd60be | |
parent | eb5df5e1622bcd5298ce1e3014c49233faa7a632 (diff) | |
download | jquery-25d933909b7ff2e1bdb330667c81e50a5eef5505.tar.gz jquery-25d933909b7ff2e1bdb330667c81e50a5eef5505.zip |
2.0: Remove trim shim
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
-rw-r--r-- | src/core.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core.js b/src/core.js index 0bca7e369..44ad7fe67 100644 --- a/src/core.js +++ b/src/core.js @@ -44,9 +44,6 @@ var // Used for splitting on whitespace core_rnotwhite = /\S+/g, - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) @@ -627,20 +624,9 @@ jQuery.extend({ return obj; }, - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, + trim: function( text ) { + return text == null ? "" : core_trim.call( text ); + }, // results is for internal usage only makeArray: function( arr, results ) { |