W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] Parsing: Attributes in End Tags

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 31 Jan 2006 20:55:28 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0601312048350.2856@dhalsim.dreamhost.com>
On Tue, 31 Jan 2006, Lachlan Hunt wrote:
>
> Hi,
>   When tokenising an end tag, the tokeniser switches to the Tag Name state
> (just like with a start tag).  However, as a result, this now becomes
> syntactically valid:
> 
> </p foo="bar">
> 
> There should be an easy parse error upon encountering the first 
> non-whitespace character (except for '>') after the tag name, but which 
> then continues to parse the attributes instead of just searching for the 
> first occurrence of '>' because of the way browsers handle </p foo=">">

Good point.

Since that would be somewhat hard to define neatly, I've instead just 
added a requirement at the end of the tokeniser to cover this.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 31 January 2006 12:55:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:25 UTC