Merged r3581-3616 from 1.0 branch, plus some report tweaks

This commit is contained in:
Dan Stillman 2008-10-25 08:01:43 +00:00
parent 01edde493f
commit 310e233480
2 changed files with 33 additions and 3 deletions

View file

@ -93,13 +93,12 @@ Zotero.Report = new function() {
for each(var note in arr.reportChildren.notes) {
content += '<li id="i' + note.itemID + '">\n';
content += note.note + '\n';
if (note.note.substr(0, 1024).match(/<p[^>]*>/)) {
content += note.note + '\n';
}
// Wrap plaintext notes in <p>
else {
content += '<p class="plaintext">' + note.note + '</p>\n';
content += '<p class="plaintext">' + escapeXML(note.note) + '</p>\n';
}
// Child note tags
@ -336,6 +335,19 @@ Zotero.Report = new function() {
// Attachment tags
content += _generateTagsList(attachment);
// Attachment note
if (attachment.note) {
content += '<div class="note">';
if (attachment.note.substr(0, 1024).match(/<p[^>]*>/)) {
content += attachment.note + '\n';
}
// Wrap plaintext notes in <p>
else {
content += '<p class="plaintext">' + escapeXML(attachment.note) + '</p>\n';
}
content += '</div>';
}
content += '</li>\n';
}
content += '</ul>\n';