luci-app-adblock: XHTML fix
authorDirk Brenken <dev@brenken.org>
Mon, 28 Dec 2020 18:28:18 +0000 (19:28 +0100)
committerDirk Brenken <dev@brenken.org>
Mon, 28 Dec 2020 18:28:18 +0000 (19:28 +0100)
* made DNS Report page XHTML compatible

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js

index 1b55bf90698716cc7bab8f68e9d47814b3659939..e7414f865b6424950929daa0200d8bdb73acabe5 100644 (file)
@@ -227,13 +227,17 @@ return L.view.extend({
                                b_cnt = content.data.top_domains[i].count;
                        }
                        if (content.data.top_domains[i]) {
-                               b_addr = '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.top_domains[i].address) + '&k1=-1&km=l&kh=1" target="_blank" title="Search this domain">' + content.data.top_domains[i].address + '</a>';
+                               //[!CDATA[
+                                       b_addr = '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.top_domains[i].address) + '&amp;k1=-1&amp;km=l&amp;kh=1" target="_blank" title="Search this domain">' + content.data.top_domains[i].address + '</a>';
+                               //]]>
                        }
                        if (content.data.top_blocked[i]) {
                                c_cnt = content.data.top_blocked[i].count;
                        }
                        if (content.data.top_blocked[i]) {
-                               c_addr = '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.top_blocked[i].address) + '&k1=-1&km=l&kh=1" target="_blank" title="Search this domain">' + content.data.top_blocked[i].address + '</a>';
+                               //[!CDATA[
+                                       c_addr = '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.top_blocked[i].address) + '&amp;k1=-1&amp;km=l&amp;kh=1" target="_blank" title="Search this domain">' + content.data.top_blocked[i].address + '</a>';
+                               //]]>
                        }
                        rows_top.push([
                                a_cnt,
@@ -284,7 +288,9 @@ return L.view.extend({
                                        content.data.requests[i].date,
                                        content.data.requests[i].time,
                                        content.data.requests[i].client,
-                                       '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.requests[i].domain) + '&k1=-1&km=l&kh=1" target="_blank" title="Search this domain">' + content.data.requests[i].domain + '</a>',
+                                       //[!CDATA[
+                                               '<a href="https://duckduckgo.com/?q=' + encodeURIComponent(content.data.requests[i].domain) + '&amp;k1=-1&amp;km=l&amp;kh=1" target="_blank" title="Search this domain">' + content.data.requests[i].domain + '</a>',
+                                       //]]>
                                        content.data.requests[i].rc,
                                        button
                                ]);