summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-20 10:47:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-20 10:47:29 -0700
commitb3b40546cb5ad00ee6fadcd83bcc38854fb137ae (patch)
tree4c7d42e9c20c8fa8ffcfb83ae653ac74edf56689 /src/Text/Pandoc
parentcab4b829b3683cec1def11d7189b5a850f23b016 (diff)
HTML reader: Fix performance issue with malformed HTML tables.
We let a `</table>` tag close an open `<tr>` or `<td>`. Closes #1167.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index 7bbad4257..552e8a251 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -471,6 +471,8 @@ pCloses tagtype = try $ do
(TagClose "ul") | tagtype == "li" -> return ()
(TagClose "ol") | tagtype == "li" -> return ()
(TagClose "dl") | tagtype == "li" -> return ()
+ (TagClose "table") | tagtype == "td" -> return ()
+ (TagClose "table") | tagtype == "tr" -> return ()
_ -> mzero
pTagText :: TagParser Inlines