diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:47:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:47:29 -0700 |
commit | b3b40546cb5ad00ee6fadcd83bcc38854fb137ae (patch) | |
tree | 4c7d42e9c20c8fa8ffcfb83ae653ac74edf56689 /src/Text/Pandoc | |
parent | cab4b829b3683cec1def11d7189b5a850f23b016 (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.hs | 2 |
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 |