diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2012-08-20 09:33:35 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-08-20 09:33:35 -0400 |
commit | ac043b1bc8096bfbb4be7995af4f5ccc5cad7c19 (patch) | |
tree | f30bb2788ea2097730b9f6a00c9ef5ad87877325 /src | |
parent | 0f553ed0ca0c50c5f66377e9f2c6314f822e8f25 (diff) | |
download | jquery-ac043b1bc8096bfbb4be7995af4f5ccc5cad7c19.tar.gz jquery-ac043b1bc8096bfbb4be7995af4f5ccc5cad7c19.zip |
Revert "Fix #12350. Remove BOM in jQuery.trim. Close gh-897."
This reverts commit 2b5b4ebbd78ce10cbbe2a6f057feea615fc69629.
String.prototype.trim doesn't trim BOM in Safari 5.0 so this won't work without additional feature detects.
http://swarm.jquery.org/result/165379
Diffstat (limited to 'src')
-rw-r--r-- | src/core.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.js b/src/core.js index 4334ae261..e7b94acda 100644 --- a/src/core.js +++ b/src/core.js @@ -37,8 +37,8 @@ var core_rnotwhite = /\S/, core_rspace = /\s+/, - // IE doesn't match many whitespace characters with \s - rtrim = core_rnotwhite.test("\xA0") ? /^[\s\xA0\uFEFF]+|[\s\xA0\uFEFF]+$/g : /^\s+|\s+$/g, + // IE doesn't match non-breaking spaces with \s + rtrim = core_rnotwhite.test("\xA0") ? (/^[\s\xA0]+|[\s\xA0]+$/g) : /^\s+|\s+$/g, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) |