diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js
index 3663822f..2ace4551 100644
--- a/scripts/pi-hole/js/settings.js
+++ b/scripts/pi-hole/js/settings.js
@@ -268,9 +268,23 @@ $(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) {
+ // Show "unknown", when host is "*"
+ var str;
+ if (data === "*") {
+ str = "unknown";
+ } else {
+ str = typeof data === "string" ? utils.escapeHtml(data) : data;
+ }
+
+ return str;
+ },
+ },
],
paging: true,
order: [[2, "asc"]],
diff --git a/settings.php b/settings.php
index ec75d9e8..ba933e09 100644
--- a/settings.php
+++ b/settings.php
@@ -595,9 +595,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "dns", "piho
}
$host = htmlentities($line[3]);
- if ($host == "*") {
- $host = "unknown";
- }
$clid = $line[4];
if ($clid == "*") {