git.iko.soy/typeable/pandoc
on master help sign in
HTML reader: Fix performance issue with malformed HTML tables.

We let a `</table>` tag close an open `<tr>` or `<td>`. Closes #1167.

commitb3b40546cb5ad00ee6fadcd83bcc38854fb137ae authorJohn MacFarlane <jgm@berkeley.edu> dateFri 20 Jun 2014, 10:47 (12 years ago) parentcab4b82
1 file changed+2
src/Text/Pandoc/Readers/HTML.hs+2
src/Text/Pandoc/Readers/HTML.hs+2
@@ -471,6 +471,8 @@ pCloses tagtype = try $ do
471471 (TagClose "ul") | tagtype == "li" -> return ()
472472 (TagClose "ol") | tagtype == "li" -> return ()
473473 (TagClose "dl") | tagtype == "li" -> return ()
474+ (TagClose "table") | tagtype == "td" -> return ()
475+ (TagClose "table") | tagtype == "tr" -> return ()
474476 _ -> mzero
475477
476478pTagText :: TagParser Inlines