You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/10/08 10:02:00 UTC
[incubator-ponymail] branch master updated: Flesh out escape_html
method
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git
The following commit(s) were added to refs/heads/master by this push:
new ef5b88f Flesh out escape_html method
ef5b88f is described below
commit ef5b88feeb1273c35725b55e992f02df324620e6
Author: Sebb <se...@apache.org>
AuthorDate: Fri Oct 8 11:01:48 2021 +0100
Flesh out escape_html method
---
test/stats_cli.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/stats_cli.lua b/test/stats_cli.lua
index 8c285da..1f69e4d 100755
--- a/test/stats_cli.lua
+++ b/test/stats_cli.lua
@@ -49,8 +49,9 @@ end
r.puts = function(r, ...) _CACHE.puts = JSON.decode(...) end
-- TODO
-r.escape_html = function(r, val)
- return val
+r.escape_html = function(r, val)
+ -- < > & are definitely escaped by the real escape_html
+ return val:gsub('>', '>'):gsub('<', '<'):gsub('&', '&')
end
-- override the parse-args function so it returns our test data