Re: Whitespace after </body> (detailed review of parsing algorithm)

On Wed, 22 Aug 2007, Simon Pieters wrote:
> 
> (This is part of my detailed review of the parsing algorithm.)
> 
> How should the following be parsed?:
> 
>   <body></body> </html>
> 
> As I read the spec, the space is added to the body element, because that 
> is still the current node even in the "after body" insertion mode. Is 
> this a correct reading of the spec? If so, is it intentional?

Yes and yes. The problem is with handling this case:

   <body>hello</body> world</html>

...which has to end up the same as:

   <body>hello world</body></html>

...for legacy reasons. We have a similar problem with spaces in <table> 
elements at the moment (except in reverse, spaces get lost right now); we 
might just use the same solution for both.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 22 August 2007 23:13:29 UTC