commit e3ce3bf0c431cc0f0b761812bc6c58165d03c3ad
parent 759c7bd58b86b18408d786f89e2553e781840f9a
Author: aurimasv <aurimas.dev@gmail.com>
Date: Wed, 7 Mar 2012 21:27:51 -0600
Include \s in superCleanString, so we match non-breaking space and other space characters outside of 7 bit ASCII
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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]+$/, "");
},
/**