diff --git a/chrome/content/zotero/xpcom/data/notes.js b/chrome/content/zotero/xpcom/data/notes.js index 88a2599c33..74c18983c5 100644 --- a/chrome/content/zotero/xpcom/data/notes.js +++ b/chrome/content/zotero/xpcom/data/notes.js @@ -36,9 +36,21 @@ Zotero.Notes = new function() { * Return first line (or first MAX_LENGTH characters) of note content **/ function noteToTitle(text) { - text = Zotero.Utilities.trim(text); + var origText = text; + text = text.trim(); text = Zotero.Utilities.unescapeHTML(text); + // If first line is just an opening HTML tag, remove it + // + // Example: + // + //
+ //

Foo

+ //
+ if (/^<[^>\n]+[^\/]>\n/.test(origText)) { + text = text.trim(); + } + var max = this.MAX_TITLE_LENGTH; var t = text.substring(0, max);