use textContent instead ot innerHTML to prevent possible xss attack

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2021-04-11 20:04:34 +01:00
parent 6fd3a02bb0
commit 074621be54

View File

@@ -270,8 +270,8 @@ function addFromQueryLog(domain, list) {
var listtype = list === "white" ? "Whitelist" : "Blacklist";
alProcessing.children(alDomain).html(domain);
alProcessing.children(alList).html(listtype);
alProcessing.children(alDomain).text(domain);
alProcessing.children(alList).text(listtype);
alertModal.modal("show");
// add Domain to List after Modal has faded in
@@ -298,8 +298,8 @@ function addFromQueryLog(domain, list) {
}, 10000);
} else {
// Success
alSuccess.children(alDomain).html(domain);
alSuccess.children(alList).html(listtype);
alSuccess.children(alDomain).text(domain);
alSuccess.children(alList).text(listtype);
alSuccess.fadeIn(1000);
setTimeout(function () {
alertModal.modal("hide");