www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e509d35a8140b774dea1adc9080205863d6d9056
parent 8f65c52f6cf161f6413f67984a56855d9a70086a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 31 May 2011 20:24:13 +0000

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


Diffstat:
Mchrome/content/zotero/xpcom/quickCopy.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/quickCopy.js b/chrome/content/zotero/xpcom/quickCopy.js @@ -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);