mirror of
https://github.com/pi-hole/web.git
synced 2026-04-20 00:39:52 +01:00
Escape only where we are displaying
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -86,8 +86,8 @@ function padNumber(num) {
|
||||
var showAlertBox = null;
|
||||
function showAlert(type, icon, title, message) {
|
||||
const options = {
|
||||
title: " <strong>" + title + "</strong><br>",
|
||||
message: message,
|
||||
title: " <strong>" + escapeHtml(title) + "</strong><br>",
|
||||
message: escapeHtml(message),
|
||||
icon: icon,
|
||||
},
|
||||
settings = {
|
||||
@@ -123,9 +123,9 @@ function showAlert(type, icon, title, message) {
|
||||
var data = JSON.parse(message);
|
||||
console.log(data); // eslint-disable-line no-console
|
||||
if (data.error !== undefined) {
|
||||
options.title = " <strong>" + data.error.message + "</strong><br>";
|
||||
options.title = " <strong>" + escapeHtml(data.error.message) + "</strong><br>";
|
||||
|
||||
if (data.error.hint !== null) options.message = data.error.hint;
|
||||
if (data.error.hint !== null) options.message = escapeHtml(data.error.hint);
|
||||
}
|
||||
} catch {
|
||||
// Do nothing
|
||||
|
||||
Reference in New Issue
Block a user