mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-03-23 16:54:03 +00:00
Escape periods in wildcard converted regex filters.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
cfd95dbe87
commit
70f2b26c86
1 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ AddDomain() {
|
|||
bool=true
|
||||
domain="${1}"
|
||||
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))${domain}$"
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo domain | sed "s/\./\\\./g")$"
|
||||
|
||||
# Is the domain in the list?
|
||||
# Search only for exactly matching lines
|
||||
|
@ -186,7 +186,7 @@ RemoveDomain() {
|
|||
[[ -z "${type}" ]] && type="--wildcard-only"
|
||||
domain="${1}"
|
||||
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))${domain}$"
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))$(echo domain | sed "s/\./\\\./g")$"
|
||||
|
||||
bool=true
|
||||
# Is it in the list?
|
||||
|
|
Loading…
Add table
Reference in a new issue