[whatwg] Handling <title> inside <body>

I noticed that, according to the html5 algorithm, when the parser sees a 
<title> start tag when in the "in body" insertion mode, it's not 
supposed to relocate it to the head element. Opera matches this 
behaviour, but Firefox moves any title tag  it finds into the head element.

The description of the title element in the spec ("4.2.2 The title 
element") says:

    Contexts in which this element may be used:
        In a head element containing no other title elements.

I don't care very strongly about whether or not title elements are 
allowed anywhere, but I do think the output of the parsing algorithm 
should be valid html according to the rest of the spec. So, in my 
opinion, we need to change either the allowed context of the title 
element, or the parsing algorithm.

I think everything I've said about the <title> element also applies to 
the <base> element.


FWIW: In our implementation, I've changed the handling of "base" and 
"title" in "in body" to:

    Process the token using the rules for the "after head" insertion mode.

instead of processing them with the rules for "in head".


Best regards,
Tommy

Received on Monday, 10 November 2008 02:51:34 UTC