Fixes #1822, Dragging notes that contain HTML entities sends HTML as text

This commit is contained in:
Dan Stillman 2011-05-31 20:24:13 +00:00
parent 8f65c52f6c
commit e509d35a81

View file

@ -199,7 +199,12 @@ Zotero.QuickCopy = new function() {
for (var i=0; i<notes.length; i++) {
var noteContent = notes[i].getNote();
try {
var noteDiv = new XML('<div class="zotero-note">' + noteContent + '</div>');
var noteDiv = new XML('<div class="zotero-note">'
+ noteContent
// &nbsp; is the only HTML entity we allow in
// notes, and it's not valid XML
.replace('&nbsp;', '&#160;')
+ '</div>');
}
catch (e) {
Zotero.debug(e);