diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index e0d8d65bf..7fd0ba400 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1333,14 +1333,6 @@ Zotero.Translate.Base.prototype = { if(this instanceof Zotero.Translate.Export || this instanceof Zotero.Translate.Import) { src += "Zotero.Collection = function () {};"+ "Zotero.Collection.prototype.complete = function() { Zotero._collectionDone(this); };"; - if (this instanceof Zotero.Translate.Import) { - // 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);}"+ - "return xml;"+ - "};"; - } } if(Zotero.isFx && !Zotero.isBookmarklet) { @@ -2156,7 +2148,7 @@ Zotero.Translate.IO.String.prototype = { "read":"r", "write":"r", "setCharacterSet":"r", - "_getXML":"r" + "getXML":"r" }, "_initRDF":function(callback) { @@ -2230,7 +2222,7 @@ Zotero.Translate.IO.String.prototype = { this.contentLength = this.string.length; }, - "_getXML":function() { + "getXML":function() { try { var xml = Zotero.Translate.IO.parseDOMXML(this.string); } catch(e) { diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index 9492d6b0f..32a581d66 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -636,7 +636,7 @@ Zotero.Translate.IO.Read = function(file, mode) { Zotero.Translate.IO.Read.prototype = { "__exposedProps__":{ - "_getXML":"r", + "getXML":"r", "RDF":"r", "read":"r", "setCharacterSet":"r" @@ -730,7 +730,7 @@ Zotero.Translate.IO.Read.prototype = { return str.value; }, - "_getXML":function() { + "getXML":function() { if(this.bytesRead !== 0) this._seekToStart(this._charset); try { var xml = Zotero.Translate.IO.parseDOMXML(this._rawStream, this._charset, this.file.fileSize);