diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js
index 3663822f8c..7506648459 100644
--- a/scripts/pi-hole/js/settings.js
+++ b/scripts/pi-hole/js/settings.js
@@ -268,9 +268,22 @@ $(function () {
columnDefs: [
{ bSortable: false, orderable: false, targets: -1 },
{
- targets: [0, 1, 2],
+ targets: [0, 1],
render: $.fn.dataTable.render.text(),
},
+ {
+ targets: 2,
+ render: function (data, type, row) {
+ // Show "unknown", when host is "*"
+ if (data == "*") {
+ return "unknown";
+ } else {
+ return typeof data === "string"
+ ? data.replace(//g, ">").replace(/"/g, """)
+ : data;
+ }
+ },
+ },
],
paging: true,
order: [[2, "asc"]],
diff --git a/settings.php b/settings.php
index ec75d9e84d..ba933e0913 100644
--- a/settings.php
+++ b/settings.php
@@ -595,9 +595,6 @@ function convertseconds($argument)
}
$host = htmlentities($line[3]);
- if ($host == "*") {
- $host = "unknown";
- }
$clid = $line[4];
if ($clid == "*") {