Inline definitions in DOCTYPE containing '<'/'>' not parsed
Brought to you by:
derrickoswald
The Lexer does not seem to be able to handle DOCTYPE declarations containing an internal subset of definitions correctly, as the syntax within the squared brackets is SGML like the rest of the document, but here it is part of the tag itself.
For example the DOCTYPE declaration
---
<!DOCTYPE h1 [ <!ENTITY entity "TheText"> ]>
---
is being parsed into a DoctypeTag containing only
---
<!DOCTYPE h1 [ >
---
according to toHtml().