From 61e3ba727aa5043088e51745b1c33899613090a2 Mon Sep 17 00:00:00 2001 From: rdwebdesign Date: Sat, 29 Jan 2022 03:14:22 -0300 Subject: [PATCH] Escaping only when is necessary Signed-off-by: rdwebdesign --- scripts/pi-hole/js/settings.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index b93874216f..45ebde4b77 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -276,9 +276,13 @@ $(function () { render: function (data, type, row) { // Show "unknown", when host is "*" if (data == "*") { - return 'unknown'; + return "unknown"; } else { - return data; + return ( + typeof data === "string" ? + data.replace(//g, ">").replace(/"/g, """) : + data + ); } }, },