summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock/luasrc/controller
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-12-22 18:37:45 +0100
committerDirk Brenken <dev@brenken.org>2018-12-22 18:37:45 +0100
commit0299b132928afcc32a58f772e7f510086b3efca0 (patch)
tree27395ad966ad23d425232503ca6ed352abce9462 /applications/luci-app-adblock/luasrc/controller
parent5aa2d3a77f2c77af8fbabf0a18c33e1c4b0cd1d9 (diff)
luci-app-adblock: minor fixes
* use new XHR default on report page * fix wrong string.find syntax Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/luasrc/controller')
-rw-r--r--applications/luci-app-adblock/luasrc/controller/adblock.lua4
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