HTML reader: fixed bug in pClose.

This caused exponential parsing behavior in documnets
with unclosed tags in dl, dd, dt.
This commit is contained in:
John MacFarlane 2016-05-21 23:05:00 -07:00
parent 2e266b6a3a
commit 446cf6a1cf

View file

@ -707,7 +707,7 @@ pCloses tagtype = try $ do
(TagOpen t' _) | t' `closes` tagtype -> return ()
(TagClose "ul") | tagtype == "li" -> return ()
(TagClose "ol") | tagtype == "li" -> return ()
(TagClose "dl") | tagtype == "li" -> return ()
(TagClose "dl") | tagtype == "dd" -> return ()
(TagClose "table") | tagtype == "td" -> return ()
(TagClose "table") | tagtype == "tr" -> return ()
_ -> mzero