From e3ce3bf0c431cc0f0b761812bc6c58165d03c3ad Mon Sep 17 00:00:00 2001 From: aurimasv Date: Wed, 7 Mar 2012 21:27:51 -0600 Subject: [PATCH] Include \s in superCleanString, so we match non-breaking space and other space characters outside of 7 bit ASCII --- chrome/content/zotero/xpcom/utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index cc484142d..15f514015 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -215,8 +215,8 @@ Zotero.Utilities = { throw "superCleanString: argument must be a string"; } - var x = x.replace(/^[\x00-\x27\x29-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+/, ""); - return x.replace(/[\x00-\x28\x2A-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]+$/, ""); + var x = x.replace(/^[\x00-\x27\x29-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F\s]+/, ""); + return x.replace(/[\x00-\x28\x2A-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F\s]+$/, ""); }, /**