Description
I tried using html5lib for HTML validation, to make sure that my users author valid, well-defined HTML. To that end, I parsed the input HTML with html5lib and used the HTMLParser.errors
property to flag errors. Ideally, I would like to flag all violations listed in HTML5 §1.10 Conformance requirements for authors.
Sample input:
<foo>Hello World!</foo>
Expected behavior: error logged for each use of a tag currently undefined in the HTML spec.
Observed behavior: undefined tags are silently accepted.
Sample input:
<ul>Hello</ul>
Expected behavior: error logged for use of PCDATA in an element whose content model permits only li
elements.
Observed behavior: content model violation is silently ignored.
Sample input:
<font color="red">Test</font>
Expected behavior: error logged for use of presentational markup.
Observed behavior: accepted silently.