diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml index 3b9bb0435..ba21f3459 100644 --- a/chrome/content/zotero/bindings/styled-textbox.xml +++ b/chrome/content/zotero/bindings/styled-textbox.xml @@ -228,7 +228,7 @@ var html = val; if(this._format == "Integration" || this._format == "RTF") { - bodyStyle = ""; + var bodyStyle = ""; if(html.substr(0, 3) == "\\li") { // try to show paragraph formatting var returnIndex = html.indexOf("\r\n"); diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index a7847234e..f3150c19f 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -1242,7 +1242,7 @@ Zotero.Item.prototype.save = function() { var parent = this.isNote() ? this.getSource() : null; var noteText = this._noteText ? this._noteText : ''; // Add
' + + note.replace(/\n/g, '
') + .replace(/\t/g, ' ') + .replace(/ /g, ' ') + + '
'; + note = note.replace(/\s*<\/p>/g, '
'); + var sql = "UPDATE itemNotes SET note=? WHERE itemID=?"; + Zotero.DB.query(sql, [note, this.id]); + } + // Don't include