[Imps] </body> and after body phase
ian at hixie.ch
Tue Jan 16 14:49:59 PST 2007
On Sun, 14 Jan 2007, Anne van Kesteren wrote:
> I need some kind of strategy that:
> <!doctype html><li></body>
> doesn't cause any parse errors but that
> <!doctype html><div><li></body>
> Note you can't actually imply </li> on </body> because that would break
> (This doesn't seem to be covered in the specification, but is assumed in
> at least one of the Google testcases (and makes sense).)
Yeah, known issue.
You just want to start at the end off the stack and walk back until the
second element. If they are all elements that get closed with you generate
implied end tags, and if the second element is <body>, then you're ok,
otherwise, raise a parse error.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the Implementors