summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-04-20 19:11:37 +0000
committerTed Trask <ttrask01@yahoo.com>2013-04-20 19:11:37 +0000
commit3928448aca53a7d775a3956db816bc1dea7afe3e (patch)
tree7e2440d64be4ec0932242aed97c3dbf253701222
parent1bddbe24c4fa3f197de36130b8ff84899f99dd2e (diff)
downloadacf-weblog-3928448aca53a7d775a3956db816bc1dea7afe3e.tar.bz2
acf-weblog-3928448aca53a7d775a3956db816bc1dea7afe3e.tar.xz
Fixed bug where user words not properly escaped
-rw-r--r--weblog-controller.lua2
-rw-r--r--weblog-model.lua10
2 files changed, 6 insertions, 6 deletions
diff --git a/weblog-controller.lua b/weblog-controller.lua
index 1b6f09b..4c5f498 100644
--- a/weblog-controller.lua
+++ b/weblog-controller.lua
@@ -118,5 +118,5 @@ function listfiles(self)
end
function editfile(self)
- return self.handle_form(self, function() return self.model.readfile(self.clientdata.filename) end, self.model.updatefile, self.clientdata, "Save", "Edit Weblog File", "Weblog File Saved" )
+ return self.handle_form(self, self.model.readfile, self.model.updatefile, self.clientdata, "Save", "Edit Weblog File", "Weblog File Saved" )
end
diff --git a/weblog-model.lua b/weblog-model.lua
index 9d1c152..bb1bff1 100644
--- a/weblog-model.lua
+++ b/weblog-model.lua
@@ -462,7 +462,7 @@ local function checkwords(logentry)
if not thisline then
break
end
- _,instcnt = string.lower(logentry.URL):gsub(thisline, " ")
+ _,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(thisline), " ")
if instcnt ~= 0 then
logentry.ignoreme = true
--logme("ignoring...")
@@ -477,7 +477,7 @@ local function checkwords(logentry)
break
end
- _,instcnt = string.lower(logentry.URL):gsub(thisline, " ")
+ _,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(thisline), " ")
if instcnt ~= 0 then
-- logme("instcnt = "..instcnt)
isbad=1
@@ -520,7 +520,7 @@ local function checkwords(logentry)
if not goodline then
break
end
- _,instcnt = string.lower(logentry.URL):gsub(goodline, " ")
+ _,instcnt = string.lower(logentry.URL):gsub(format.escapemagiccharacters(goodline), " ")
--if string.find(logentry.URL,goodline) then
if instcnt ~= 0 then
if wrdcnt >= instcnt then
@@ -1451,8 +1451,8 @@ function listfiles()
return retval
end
-function readfile(filename)
- return modelfunctions.getfiledetails(filename, files)
+function readfile(self, clientdata)
+ return modelfunctions.getfiledetails(clientdata.filename, files)
end
function updatefile(self, filedetails)