From 5a595320559b5e28a591b3bcb9e7e8f799b28227 Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Wed, 27 Apr 2022 00:02:38 +0700 Subject: [PATCH] parser: fix #59, fix 60 --- src/htmlparser.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/htmlparser.lua b/src/htmlparser.lua index 1faaced..c6226be 100644 --- a/src/htmlparser.lua +++ b/src/htmlparser.lua @@ -221,7 +221,9 @@ local function parse(text,limit) -- {{{ local closeend = tpos local closingloop 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 err("Tag closing loop reached loop limit (%d). Consider either increasing it or checking HTML-code for syntax errors", limit) break