mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 22:18:26 -05:00
Revert "Fix #12350. Remove BOM in jQuery.trim. Close gh-897."
This reverts commit 2b5b4ebbd7.
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user