Include \s in superCleanString, so we match non-breaking space and other space characters outside of 7 bit ASCII

This commit is contained in:
aurimasv 2012-03-07 21:27:51 -06:00
parent 759c7bd58b
commit e3ce3bf0c4

View File

@ -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]+$/, "");
},
/**