Protect all contractions in full-text content, not just first

nsISemanticUnitScanner doesn't seem to be able to deal with single
quotes, so protect those. (There might be other characters it doesn't
handle, but this is ancient code, so it stays as is for now.)
This commit is contained in:
Dan Stillman 2013-11-19 01:36:16 -05:00
parent e2e6dc71e2
commit 7014b875c7

View file

@ -1613,13 +1613,13 @@ Zotero.Fulltext = new function(){
function _markTroubleChars(text){
text = text.replace("'", "zoteroapostrophe");
text = text.replace(/'/g, "zoteroapostrophe");
return text;
}
function _restoreTroubleChars(text){
text = text.replace("zoteroapostrophe", "'");
text = text.replace(/zoteroapostrophe/g, "'");
return text;
}
}