luci-app-adblock: XHTML fix
authorDirk Brenken <dev@brenken.org>
Mon, 28 Dec 2020 18:19:08 +0000 (19:19 +0100)
committerDirk Brenken <dev@brenken.org>
Mon, 28 Dec 2020 18:19:08 +0000 (19:19 +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 b85abd0238eff1755889d2a8d2c4d798ed36f6d5..fdd358038c804e5ca3c57fa2bd7712286ae15f47 100644 (file)
@@ -228,13 +228,17 @@ return 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,
@@ -285,7 +289,9 @@ return 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
                                ]);