fx-compat: Use DOMParser constructor in _eventToEventTitle

This commit is contained in:
Abe Jellinek 2022-08-15 10:37:59 -04:00
parent 676abca671
commit b03657add3

View file

@ -805,8 +805,7 @@ Zotero.Style.prototype.getCiteProc = function(locale, format, automaticJournalAb
* Until https://github.com/citation-style-language/styles/issues/6151 * Until https://github.com/citation-style-language/styles/issues/6151
*/ */
Zotero.Style.prototype._eventToEventTitle = function (xml) { Zotero.Style.prototype._eventToEventTitle = function (xml) {
var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"] var parser = new DOMParser();
.createInstance(Components.interfaces.nsIDOMParser);
var doc = parser.parseFromString(xml, "text/xml"); var doc = parser.parseFromString(xml, "text/xml");
// Ignore styles that already include `event-title` // Ignore styles that already include `event-title`
if (doc.querySelector('[variable*="event-title"]')) { if (doc.querySelector('[variable*="event-title"]')) {