From 8529cb067ce6161eb98e09822ab13c0a33880a50 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 18 May 2025 14:50:39 +0300 Subject: [PATCH] Fix a few HTML validation issues Signed-off-by: XhmikosR --- scripts/js/footer.js | 2 +- scripts/js/queries.js | 4 ++-- settings-dhcp.lp | 15 +++++++-------- settings-dns.lp | 2 +- style/pi-hole.css | 4 ++-- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index ec628ed2..2ce29eeb 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -561,7 +561,7 @@ function updateVersionInfo() { v.name + " " + localVersion + - ' · Update available!' ); diff --git a/scripts/js/queries.js b/scripts/js/queries.js index af86a0c5..c0a3c2ba 100644 --- a/scripts/js/queries.js +++ b/scripts/js/queries.js @@ -345,7 +345,7 @@ function formatInfo(data) { if (dnssec.color !== "") { dnssecInfo = divStart + - 'DNSSEC status:  ' + dnssec.text + @@ -362,7 +362,7 @@ function formatInfo(data) { let replyInfo = ""; replyInfo = data.reply.type !== "UNKNOWN" - ? divStart + "Reply:  " + data.reply.type + "" + ? divStart + "Reply:  " + data.reply.type + "" : divStart + "Reply:  No reply received"; // Show extended DNS error if applicable diff --git a/settings-dhcp.lp b/settings-dhcp.lp index 4bfa083c..6ee2f8df 100644 --- a/settings-dhcp.lp +++ b/settings-dhcp.lp @@ -180,13 +180,12 @@ mg.include('scripts/lua/settings_header.lp','r')

Only one entry per MAC address is allowed.

-

Examples: -

    -
  • 00:20:e0:3b:13:af,192.168.0.123
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the address 192.168.0.123
     
  • -
  • 00:20:e0:3b:13:af,laptop
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the name laptop
     
  • -
  • 00:20:e0:3b:13:af,192.168.0.123,laptop,infinite
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the address 192.168.0.123, the name laptop, and an infinite DHCP lease
     
  • -
-

+

Examples:

+
    +
  • 00:20:e0:3b:13:af,192.168.0.123
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the address 192.168.0.123
     
  • +
  • 00:20:e0:3b:13:af,laptop
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the name laptop
     
  • +
  • 00:20:e0:3b:13:af,192.168.0.123,laptop,infinite
    tells Pi-hole to give the machine with hardware address 00:20:e0:3b:13:af the address 192.168.0.123, the name laptop, and an infinite DHCP lease
     
  • +
@@ -209,7 +208,7 @@ mg.include('scripts/lua/settings_header.lp','r')
  • More than one line can be associated (by name, hardware address or UID) with a host. Which one is used (and therefore which address is allocated by DHCP and appears in the DNS) depends on the subnet on which the host last obtained a DHCP lease: the line with an address within the subnet is used. If more than one address is within the subnet, the result is undefined. A corollary to this is that the name associated with a host defined here does not appear in the DNS until the host obtains a DHCP lease.
  • The special keyword ignore tells Pi-hole to never offer a DHCP lease to a machine. The machine can be specified by hardware address, client ID or hostname, for instance 00:20:e0:3b:13:af,ignore. This is useful when there is another DHCP server on the network which should be used by some machines.
  • The set:<tag> construct sets the tag whenever this line is in use. This can be used to selectively send DHCP options just for this host. More than one tag can be set per line directive (but not in other places where "set:<tag>" is allowed). When a host matches any directive (or one implied by /etc/ethers) then the special tag "known"" is set. This allows Pi-hole to be configured to ignore requests from unknown machines using a custom config option dhcp-ignore=tag:!known in your own config file. If the host matches only a directive which cannot be used because it specifies an address on different subnet, the tag "known-othernet" is set.
  • -
  • The tag:<tag> construct filters which directives are used; more than one can be provided, in this case the request must match all of them. Tagged directives are used in preference to untagged ones. Note that one of <hwaddr>;, <client_id>; or <hostname>; still needs to be specified (can be a wildcard).
  • +
  • The tag:<tag> construct filters which directives are used; more than one can be provided, in this case the request must match all of them. Tagged directives are used in preference to untagged ones. Note that one of <hwaddr>, <client_id> or <hostname> still needs to be specified (can be a wildcard).
  • Ethernet addresses (but not client-ids) may have wildcard bytes, so for example 00:20:e0:3b:13:*,ignore will cause Pi-hole to ignore a range of hardware addresses.
  • Hardware addresses normally match any network (ARP) type, but it is possible to restrict them to a single ARP type by preceding them with the ARP-type (in HEX) and "-". so the line 06-00:20:e0:3b:13:af,1.2.3.4 will only match a Token-Ring hardware address, since the ARP-address type for token ring is 6.
  • As a special case, in DHCPv4, it is possible to include more than one hardware address. eg: 11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2. This allows an IP address to be associated with multiple hardware addresses, and gives Pi-hole permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces.
  • diff --git a/settings-dns.lp b/settings-dns.lp index be7da68d..21a9cad1 100644 --- a/settings-dns.lp +++ b/settings-dns.lp @@ -119,7 +119,7 @@ mg.include('scripts/lua/settings_header.lp','r')

    Recommended setting

    -
    diff --git a/style/pi-hole.css b/style/pi-hole.css index 1da12ba4..849a33d8 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -75,9 +75,9 @@ td.lookatme { .lookatme:after { color: #e33100; text-shadow: 0 0 5px #e33100; - /* in the html, the lookatme-text attribute must */ + /* in the html, the data-lookatme-text attribute must */ /* contain the same text as the .lookatme element */ - content: attr(lookatme-text); + content: attr(data-lookatme-text); padding: inherit; position: absolute; inset: 0;