diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 7fd0ba4004..9022ebd3cb 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -2196,7 +2196,7 @@ Zotero.Translate.IO.String.prototype = { if(lfIndex !== -1) { // in case we have a CRLF this.bytesRead = lfIndex+1; - if(this.contentLength > lfIndex && this.string[lfIndex-1] === "\r") { + if(this.contentLength > lfIndex && this.string.substr(lfIndex-1, 1) === "\r") { lfIndex--; } return this.string.substr(oldPointer, lfIndex-oldPointer); diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index f4db9c4127..a2936b2143 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -686,7 +686,7 @@ Zotero.Utilities = { } else { // this is not a skip word or comes after a colon; // we must capitalize - words[i] = upperCaseVariant[0] + lowerCaseVariant.substr(1); + words[i] = upperCaseVariant.substr(0, 1) + lowerCaseVariant.substr(1); } }