sanitize html of list elements
This commit is contained in:
parent
66c71b0ecd
commit
cbc08122f4
|
@ -207,8 +207,9 @@ function firstPass()
|
|||
|
||||
elseif string.match( line, "^%*") then -- LIST ITEMS
|
||||
-- TODO reuse {wikilinks} code from paragraphs
|
||||
-- TODO apply the sanitization to everything?
|
||||
-- web
|
||||
local strippedline = string.sub(line, 3) -- remove "* "
|
||||
local strippedline = sanitize(string.sub(line, 3)) -- remove "* "
|
||||
local webtext = string.gsub( strippedline, "{(.-)}", function (wikiname)
|
||||
return string.format("<a href='./%s.html'>%s</a>", pages[wikiname].slug, wikiname)
|
||||
end)
|
||||
|
@ -269,6 +270,8 @@ function firstPass()
|
|||
local webline = string.gsub( line, "{(.-)}", function (wikiname)
|
||||
return string.format("<a href='./%s.html'>%s</a>", pages[wikiname].slug, wikiname)
|
||||
end)
|
||||
|
||||
|
||||
if not flags.p then
|
||||
out.web = string.format("<p>%s", webline)
|
||||
flags.p = true
|
||||
|
|
Loading…
Reference in New Issue