[whatwg] Handling </br> in the "after head" insertion mode

Anne van Kesteren wrote:
> On Thu, 04 Dec 2008 11:51:05 +0100, timeless <timeless at gmail.com> wrote:
>> On Thu, Dec 4, 2008 at 12:34 PM, Tommy Thorsen <tommy at kvaleberg.com> 
>> wrote:
>>> This matches Internet Explorer and Opera, but not Firefox and 
>>> Safari. Then
>>> again, it looks like Firefox and Safari ignore all </br> tags.
>>
>> if we're both able to get away with ignoring all </br> tags, wouldn't
>> the ideal forward path be to make always ignored?
>
> Firefox and Safari do not ignore it in quirks mode. I rather keep the 
> amount of differences between quirks and standards mode to a minimum 
> (by doing what Opera and Internet Explorer do) than increase it.
>

Aha, I hadn't even thought about quirks vs. non-quirks. I definitely 
agree that keeping the differences to a minimum is a good thing.

Also, it's not like the specified parsing algorithm ignores </br> 
completely. All the insertion modes from "before html" to "in body" have 
special handling for it, except "after head". This makes it look more 
like someone just forgot to put that </br> handling in "after head" than 
like a deliberate decision to ignore the </br>.

For the record, the following markup:

<!doctype html><body></br>

results in:

<html>
    <head>
    <body>
       <br>

with the current algorithm, because the "in body" insertion mode treats 
</br> as if it was a <br>.

Received on Thursday, 4 December 2008 03:17:39 UTC