New submission from Ezio Melotti <ezio.melo...@gmail.com>: html.parser fails to handle the following invalid comments: <! foo > <! bar --> <! -- baz --> The attached patch follows the HTML5 specs [0], and parses them as "bogus comments". Currently the patch fixes the problem only when strict=False, but it might be better to make this the default behavior and apply it to 2.7 too.
[0]: http://www.w3.org/TR/html5/tokenization.html#bogus-comment-state ---------- components: Library (Lib) files: issue13960.diff keywords: patch messages: 152806 nosy: eric.araujo, ezio.melotti priority: normal severity: normal stage: patch review status: open title: Handling of broken comments in HTMLParser type: behavior versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24443/issue13960.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13960> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com