diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 1f977fe323..20e5684f47 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1444,9 +1444,13 @@ Zotero.Integration.Session.prototype._processNote = function (item) { Zotero.logError(e); } } - text = text.replace(/[\u00A0-\u9999\&]/gim, function(i) { + // Encode unicode chars + text = text.replace(/[\u00A0-\u9999\&]/gim, function (i) { return '&#'+i.charCodeAt(0)+';'; }); + if (!text.startsWith('')) { + text = `${text}`; + } return [text, citations, placeholderIDs]; };