From 2b5b4ebbd78ce10cbbe2a6f057feea615fc69629 Mon Sep 17 00:00:00 2001 From: Wesley Walser Date: Sun, 19 Aug 2012 22:28:36 -0400 Subject: Fix #12350. Remove BOM in jQuery.trim. Close gh-897. --- src/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core.js b/src/core.js index 89e25978c..f9ee24852 100644 --- a/src/core.js +++ b/src/core.js @@ -37,8 +37,8 @@ var core_rnotwhite = /\S/, core_rspace = /\s+/, - // IE doesn't match non-breaking spaces with \s - rtrim = core_rnotwhite.test("\xA0") ? (/^[\s\xA0]+|[\s\xA0]+$/g) : /^\s+|\s+$/g, + // IE doesn't match many whitespace characters with \s + rtrim = core_rnotwhite.test("\xA0") ? /^[\s\xA0\uFEFF]+|[\s\xA0\uFEFF]+$/g : /^\s+|\s+$/g, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) -- cgit v1.2.3