[whatwg] Please make < inside tags a parse error

Ian Hickson ian at hixie.ch
Thu Jun 21 21:41:34 PDT 2007


On Mon, 18 Jun 2007, Henri Sivonen wrote:
>
> The new treatment of < inside tags is
> * Potentially very confusing for authors
> * Different from previous de jure parsing
> * Different from what shipped Gecko and WebKit do.
> 
> Therefore, please add an entry for < to tag name state, before attribute 
> name state, attribute name state, after attribute name state and 
> attribute value (unquoted) state:
> 
> U+003C LESS-THAN SIGN (<)
>  Parse error. Then treat according to the "Anything else" entry below.

On Mon, 18 Jun 2007, Anne van Kesteren wrote:
> 
> How is this character different from &, ", ', etc.? The element 
> eventually created would be non-conforming anyway.

On Mon, 18 Jun 2007, Henri Sivonen wrote:
> 
> Anne pointed out on IRC that I hadn't properly considered the tag name 
> state, before attribute name state, attribute name state and after 
> attribute name state being caught on a higher layer anyway.

I don't want to add too many parse errors, so yeah, I recommend we leave 
it up to the higher-level layers here.


> In the case of attribute value (unquoted) state Gecko and WebKit already 
> do what the spec says. It is highly confusing though.

It's only confusing to us because we know about SGML, I don't think most 
people would be confused.


On Mon, 18 Jun 2007, Simon Pieters wrote:
> 
> "<" in unquoted attribute values works interoperably. No need to make it 
> a parse error in the attribute value (unquoted) state.

On Mon, 18 Jun 2007, Thomas Broyer wrote:
> 
> This doesn't mean it should be conforming either (actually, it's 
> entirely orthogonal). Parse errors are for conformance checkers, and I 
> believe those should report "<" in unquoted attribute values as errors.

On Mon, 18 Jun 2007, Anne van Kesteren wrote:
> 
> Neh: <a title=2<5 href=http://www.whatwg.org/>WHATWG</a>. Maybe a 
> warning at the discretion of conformance checkers.

On Mon, 18 Jun 2007, Henri Sivonen wrote:
>
> The source code looks like it parses to something different than it 
> actually does. This makes typos harder to spot. I've made this a warning 
> in my working copy.

I think a warning is fine. I'm not really convinced it should be 
non-conforming though.

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



More information about the whatwg mailing list