www

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

commit 4b498570c096d6ea962df1e0aa11cb6ae733ff99
parent cf29a030f2a7551aef7dae90cc3e1ff448b3dded
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun,  1 Jul 2012 15:43:08 -0400

Fix xml/dom mode

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1333,7 +1333,8 @@ Zotero.Translate.Base.prototype = { // https://bugzilla.mozilla.org/show_bug.cgi?id=609143 - can't pass E4X to sandbox in Fx4 src += "Zotero.getXML = function() {"+ "var xml = Zotero._getXML();"+ - "if(typeof xml == 'string') return new XML(xml);"+ + "if(typeof xml == 'string') { return new XML(xml);}"+ + "return xml;"+ "};"; } } @@ -2229,11 +2230,12 @@ Zotero.Translate.IO.String.prototype = { "_getXML":function() { if(this._mode == "xml/dom") { try { - return Zotero.Translate.IO.parseDOMXML(this.string); + var xml = Zotero.Translate.IO.parseDOMXML(this.string); } catch(e) { this._xmlInvalid = true; throw e; } + return (Zotero.isFx5 ? Zotero.Translate.SandboxManager.Fx5DOMWrapper(xml) : xml); } else { return this.string.replace(/<\?xml[^>]+\?>/, ""); }