You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The result is that invalid HTML like Hello <br>World</br>! will be rendered by browsers as though it had two linebreaks, Hello <br>World<br>!. This library currently (quite reasonably!) removes the erroneous end tag instead, giving Hello <br>World!
I'm using this library for processing some messy HTML, and it would be useful to have this rule match the spec / browser behaviour.
The text was updated successfully, but these errors were encountered:
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.
The WHATWG spec includes a special rule for handling
</br>
, in the section on parsing when "in body":The result is that invalid HTML like
Hello <br>World</br>!
will be rendered by browsers as though it had two linebreaks,Hello <br>World<br>!
. This library currently (quite reasonably!) removes the erroneous end tag instead, givingHello <br>World!
I'm using this library for processing some messy HTML, and it would be useful to have this rule match the spec / browser behaviour.
The text was updated successfully, but these errors were encountered: