Fix xml/dom mode, part 2
This commit is contained in:
parent
4b498570c0
commit
f369af268d
1 changed files with 7 additions and 1 deletions
|
@ -467,7 +467,13 @@ Zotero.Translate.IO.Read.prototype = {
|
|||
|
||||
"_getXML":function() {
|
||||
if(this._mode == "xml/dom") {
|
||||
return Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize);
|
||||
try {
|
||||
var xml = Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize);
|
||||
} catch(e) {
|
||||
this._xmlInvalid = true;
|
||||
throw e;
|
||||
}
|
||||
return (Zotero.isFx5 ? Zotero.Translate.SandboxManager.Fx5DOMWrapper(xml) : xml);
|
||||
} else {
|
||||
return this._readToString().replace(/<\?xml[^>]+\?>/, "");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue