parser: fix #59, fix 60

This commit is contained in:
Vadim A. Misbakh-Soloviov 2022-04-27 00:02:38 +07:00
parent 7f380f69a6
commit 5a59532055
No known key found for this signature in database
GPG Key ID: 6765F46F28E9607E

View File

@ -221,7 +221,9 @@ local function parse(text,limit) -- {{{
local closeend = tpos local closeend = tpos
local closingloop local closingloop
while true do -- TagCloseLoop {{{ while true do -- TagCloseLoop {{{
if voidelements[tag.name:lower()] then break end -- already closed -- Can't remember why did I add that, so comment it for now (and not remove), in case it will be needed again
-- (although, it causes #59 and #60, so it will anyway be needed to rework)
-- if voidelements[tag.name:lower()] then break end -- already closed
if closingloop == limit then if closingloop == limit then
err("Tag closing loop reached loop limit (%d). Consider either increasing it or checking HTML-code for syntax errors", limit) err("Tag closing loop reached loop limit (%d). Consider either increasing it or checking HTML-code for syntax errors", limit)
break break