diff options
author | Dirk Brenken <dev@brenken.org> | 2018-12-22 18:53:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-22 18:53:04 +0100 |
commit | 31d259a36156039a33366b99c80260de0c9edd3f (patch) | |
tree | ae8330675e596731da8249e6fe3e9a0965f2a491 /applications/luci-app-adblock/luasrc/controller/adblock.lua | |
parent | 21db93576aebe52707790fc1a8733dc2703d59a6 (diff) | |
parent | 0299b132928afcc32a58f772e7f510086b3efca0 (diff) |
Merge pull request #2389 from dibdot/adblock
luci-app-adblock: minor fixes
Diffstat (limited to 'applications/luci-app-adblock/luasrc/controller/adblock.lua')
-rw-r--r-- | applications/luci-app-adblock/luasrc/controller/adblock.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-adblock/luasrc/controller/adblock.lua b/applications/luci-app-adblock/luasrc/controller/adblock.lua index 0cfb8fc80c..e5061bc9d9 100644 --- a/applications/luci-app-adblock/luasrc/controller/adblock.lua +++ b/applications/luci-app-adblock/luasrc/controller/adblock.lua @@ -54,7 +54,7 @@ function adb_action(name, domain) local file = uci:get("adblock", "blacklist", "adb_src") or "/etc/adblock/adblock.blacklist" if nixio.fs.access(file) then local blacklist = nixio.fs.readfile(file) - if not string.find(blacklist, domain, 1, plain) + if not string.find(blacklist, domain, 1, true) then nixio.fs.writefile(file, blacklist.. domain.. "\n") end @@ -63,7 +63,7 @@ function adb_action(name, domain) local file = uci:get("adblock", "global", "adb_whitelist") or "/etc/adblock/adblock.whitelist" if nixio.fs.access(file) then local whitelist = nixio.fs.readfile(file) - if not string.find(whitelist, domain, 1, plain) + if not string.find(whitelist, domain, 1, true) then nixio.fs.writefile(file, whitelist.. domain.. "\n") end |