diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index c71c8532ff..2854d61d6e 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -415,21 +415,31 @@ Zotero.Items = function() { // Convert non-HTML notes on-the-fly if (note !== "") { - if (!note.substr(0, 36).match(/^
' - + note.replace(/\n/g, '
') - .replace(/\t/g, ' ') - .replace(/ /g, ' ') - + '
' + Zotero.Notes.noteSuffix; - note = note.replace(/\s*<\/p>/g, '
'); - notesToUpdate.push([item.id, note]); + if (typeof note == 'number') { + note = '' + note; + } + if (typeof note == 'string') { + if (!note.substr(0, 36).match(/^
' + + note.replace(/\n/g, '
') + .replace(/\t/g, ' ') + .replace(/ /g, ' ') + + '
' + Zotero.Notes.noteSuffix; + note = note.replace(/\s*<\/p>/g, '
'); + notesToUpdate.push([item.id, note]); + } + + // Don't include