diff --git a/chrome/content/zotero/elements/styleConfigurator.js b/chrome/content/zotero/elements/styleConfigurator.js index eb337c3c7b..278a0a4f0d 100644 --- a/chrome/content/zotero/elements/styleConfigurator.js +++ b/chrome/content/zotero/elements/styleConfigurator.js @@ -63,9 +63,10 @@ .replace(/^American Psychological Association/, "American Psychological Association (APA)") .replace(/^American Sociological Association/, "American Sociological Association (ASA)"); - styleListEl.appendChild(MozXULElement.parseXULToFragment(` - ${Zotero.Utilities.htmlSpecialChars(label)} - `)); + let richlistitem = document.createXULElement('richlistitem'); + richlistitem.value = value; + richlistitem.textContent = label; + styleListEl.append(richlistitem); }); this.value = this.getAttribute('value'); this.querySelector('#style-list').addEventListener("select", () => { @@ -147,9 +148,10 @@ menuLocalesKeys.forEach((key) => { const label = menuLocales[key]; - this.localePopupEl.appendChild(MozXULElement.parseXULToFragment(` - - `)); + let menuitem = document.createXULElement('menuitem'); + menuitem.value = key; + menuitem.label = label; + this.localePopupEl.append(menuitem); }); this.value = this._value; @@ -172,18 +174,11 @@ >