Browse Source

Remove usage of innerHTML

TheFeelTrain 3 years ago
parent
commit
ce437dbd58
1 changed files with 4 additions and 2 deletions
  1. 4 2
      native/nativeshell.js

+ 4 - 2
native/nativeshell.js

@@ -184,8 +184,10 @@ async function showSettingsModal() {
             });
 
             const legend = document.createElement("legend");
-            legend.innerHTML = "<h2>" + section.key + "</h2>";
-            legend.style.textTransform = "capitalize";
+            const legendHeader = document.createElement("h2");
+            legendHeader.textContent = section.key;
+            legendHeader.style.textTransform = "capitalize";
+            legend.appendChild(legendHeader);
             group.appendChild(legend);
 
             for (const setting of section.settings) {