﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32547	assertHTMLEqual allows invalid HTML	François Poulain	nobody	"Hi,

The docs for assertHTMLEqual says ""html1 and html2 must be valid HTML."". The formulation suggest that html validation is enforced. But is is actually easy to get test succeeding with invalid html. Eg.
```
SimpleTestCase.assertHTMLEqual(None, '<div class=""bling"" class=""blang"">', '<div class=""bling"" class=""blang"">')
```
The code rely on Python's HTMLParser (https://docs.python.org/3/library/html.parser.html) for which the documentation states it produce parsers ""able to parse invalid markup."".

I suggest to correct documentation and/or to enforce validation on the parser side.

How do you think about it?"	Uncategorized	new	Testing framework	3.1	Normal				Unreviewed	0	0	0	0	0	0
