Merge pull request #20318 from stangri/openwrt-22.03-simple-adblock

[22.03] simple-adblock: update sed for allowing domains
This commit is contained in:
Stan Grishin 2023-01-16 20:59:32 -07:00 committed by GitHub
commit f48493b940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=simple-adblock
PKG_VERSION:=1.9.3
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_LICENSE:=GPL-3.0-or-later

View File

@ -790,7 +790,7 @@ download_lists() {
for hf in $blocked_domain $canaryDomains; do echo "$hf" | sed "$domainsFilter" >> $B_TMP; done
allowed_domain="${allowed_domain}
$(cat $A_TMP)"
for hf in ${allowed_domain}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; allow_filter="$allow_filter/^(.*\.)?${hf}$/d;"; done
for hf in ${allowed_domain}; do hf="$(echo "$hf" | sed 's/\./\\./g')"; allow_filter="$allow_filter/(^|\.)${hf}$/d;"; done
[ ! -s "$B_TMP" ] && return 1
@ -966,7 +966,7 @@ adb_allow() {
for c in $string; do
output 2 " $c "
hf="$(echo "$c" | sed 's/\./\\./g')"
if sed -i "/^${hf}$/d;/\.${hf}$/d;" "$outputFile" && \
if sed -i "/(^|\.)${hf}$/d;" "$outputFile" && \
uci_add_list_if_new "${packageName}" 'config' 'allowed_domain' "$c"; then
output_ok
else