aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-02-05 18:07:39 -0600
committerthe lemons <citrons@mondecitronne.com>2022-02-05 18:07:39 -0600
commita6d33b428166b3139047ba2aba80b0e084ebf3de (patch)
tree3b571f778290a4a381c64b06d82fe7d35ba57b70
parent25d9bacac23dc430999899e960a3b9221ccf412a (diff)
escape line of text after parsing the directives
-rwxr-xr-xzzcxz.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/zzcxz.cgi b/zzcxz.cgi
index 6fbdb47..dafefdf 100755
--- a/zzcxz.cgi
+++ b/zzcxz.cgi
@@ -164,7 +164,6 @@ local function convert_markup(m)
local directives = {}
local code_block = false
for line in (m..'\n'):gmatch "(.-)\n" do
- line = html_encode(line)
if not code_block then
if line:match "^%s*$" then
goto continue
@@ -173,6 +172,8 @@ local function convert_markup(m)
parse_directive(line, directives) then
goto continue
end
+
+ line = html_encode(line)
if line:sub(1,1) == ' ' then
table.insert(result, '<pre><code>')
code_block = true