#13576: add tests about the handling of (possibly broken) condcoms.

This commit is contained in:
Ezio Melotti 2011-12-19 07:28:08 +02:00
parent 2d679a42bf
commit 6b7003a18c
2 changed files with 46 additions and 0 deletions

View file

@ -108,6 +108,10 @@ class ParserBase:
if decltype == "doctype":
self.handle_decl(data)
else:
# According to the HTML5 specs sections "8.2.4.44 Bogus
# comment state" and "8.2.4.45 Markup declaration open
# state", a comment token should be emitted.
# Calling unknown_decl provides more flexibility though.
self.unknown_decl(data)
return j + 1
if c in "\"'":