Fix xml/dom mode
This commit is contained in:
parent
cf29a030f2
commit
4b498570c0
1 changed files with 4 additions and 2 deletions
|
@ -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[^>]+\?>/, "");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue