Masterminds / html5-php

An HTML5 parser and serializer for PHP.
http://masterminds.github.io/html5-php/
Other
1.56k stars 115 forks source link

Add special case for end tag </br>. Fixes #185 #186

Closed IMSoP closed 4 years ago

IMSoP commented 4 years ago

Normally, an end tag for a void element would simply be discarded, but the spec includes a special rule as follows:

An end tag whose tag name is "br" Parse error. Drop the attributes from the token, and act as described in the next entry; i.e. act as if this was a "br" start tag token with no attributes, rather than the end tag token that it actually is.

closes https://github.com/Masterminds/html5-php/issues/185

goetas commented 4 years ago

thank you!