From 22182183e973ea8c50fd315b04a54c4c867860bd Mon Sep 17 00:00:00 2001 From: Andre Natal Date: Fri, 13 Jan 2023 14:08:44 -0800 Subject: [PATCH] Sanitize text (#630) * Sanitize text * Update extension/view/popup/js/index.js Co-authored-by: Rob Wu * Update extension/view/popup/js/index.js Co-authored-by: Rob Wu * Update extension/view/popup/index.html Co-authored-by: Rob Wu Co-authored-by: Rob Wu --- extension/view/popup/js/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extension/view/popup/js/index.js b/extension/view/popup/js/index.js index e31e173..00b4882 100644 --- a/extension/view/popup/js/index.js +++ b/extension/view/popup/js/index.js @@ -79,12 +79,13 @@ class Mediator { } const setLangs = (selector, langsToSet, value, exclude) => { - selector.innerHTML = ``; + selector.textContent = ""; + selector.add(new Option(browser.i18n.getMessage("languageDefaultOption"), "0")); for (const [code, type] of Object.entries(langsToSet)) { if (code !== exclude) { let name = langs.get(code); if (type === "dev") name += " (Beta)"; - selector.innerHTML += ``; + selector.add(new Option(name, code)); } } selector.value = value;