From ba3acbbade57bc633564a29d25a86b23d8344685 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 3 Jan 2021 22:20:22 +0100 Subject: [PATCH] Do not create links for file:// adlists Signed-off-by: DL6ER --- scripts/pi-hole/js/groups-adlists.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/scripts/pi-hole/js/groups-adlists.js b/scripts/pi-hole/js/groups-adlists.js index 3b036e68..98b0eadc 100644 --- a/scripts/pi-hole/js/groups-adlists.js +++ b/scripts/pi-hole/js/groups-adlists.js @@ -169,15 +169,23 @@ function initTable() { $("td:eq(0)", row).addClass("list-status-" + statusCode); $("td:eq(0)", row).html("" + extra); - $("td:eq(1)", row).html( - '' + - data.address + - "" - ); + if (data.address.startsWith("file://")) { + // Local files cannot be downloaded from a distant client so don't show + // a link to such a list here + $("td:eq(1)", row).html( + '' + data.address + "" + ); + } else { + $("td:eq(1)", row).html( + '' + + data.address + + "" + ); + } $("td:eq(2)", row).html( '"