diff --git a/scripts/js/charts.js b/scripts/js/charts.js index 03e9abbb..375989b2 100644 --- a/scripts/js/charts.js +++ b/scripts/js/charts.js @@ -112,7 +112,7 @@ const htmlLegendPlugin = { textLink.style.padding = 0; textLink.style.textDecoration = item.hidden ? "line-through" : ""; textLink.className = "legend-label-text"; - textLink.append(item.text); + textLink.textContent = item.text; li.append(boxSpan, textLink); ul.append(li); diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 36ca2e9d..c12830b2 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -44,7 +44,7 @@ function piholeChanged(blocking, timer = null) { const enaT = $("#enableTimer"); if (timer !== null && Number.parseFloat(timer) > 0) { - enaT.html(Date.now() + Number.parseFloat(timer) * 1000); + enaT.text(Date.now() + Number.parseFloat(timer) * 1000); setTimeout(countDown, 100); } @@ -591,7 +591,7 @@ function updateVersionInfo() { $(() => { if (!globalThis._isLoginPage) updateInfo(); const enaT = $("#enableTimer"); - const target = new Date(Number.parseInt(enaT.html(), 10)); + const target = new Date(Number.parseInt(enaT.text(), 10)); const seconds = Math.round((target.getTime() - Date.now()) / 1000); if (seconds > 0) { setTimeout(countDown, 100); diff --git a/scripts/js/network.js b/scripts/js/network.js index ec548d0e..a4d5e2c6 100644 --- a/scripts/js/network.js +++ b/scripts/js/network.js @@ -131,11 +131,11 @@ $(() => { // Insert "Never" into Last Query field when we have // never seen a query from this device if (data.lastQuery === 0) { - $("td:eq(4)", row).html("Never"); + $("td:eq(4)", row).text("Never"); } // Set number of queries to localized string (add thousand separators) - $("td:eq(5)", row).html(data.numQueries.toLocaleString()); + $("td:eq(5)", row).text(data.numQueries.toLocaleString()); const ips = []; const iptitles = [];