W3C home > Mailing lists > Public > public-html@w3.org > June 2009

Re: Parsing: "<" inside tags

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 6 Jun 2009 02:18:09 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
Cc: "public-html@w3.org" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0906060218020.1648@hixie.dreamhostps.com>
On Thu, 7 May 2009, Simon Pieters wrote:
> On Wed, 06 May 2009 20:49:06 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > On Wed, 6 May 2009, Simon Pieters wrote:
> > > 
> > > Maybe the spec should make "<" in unquoted attributes and in attribute
> > > names a syntax error in order to catch authoring mistakes like the
> > > following:
> > > 
> > >   <div class=foo<p>bar</p></div>
> > > 
> > > 
> > >   <div class=foo
> > >    <p>bar</p>
> > >   </div>
> > > 
> > > (Validators would issue other errors for those but they are not so
> > > helpful for identifying the actual mistake.)
> > 
> > It's an unfortunate error, but because of the upcoming doc="" attribute I
> > don't think we want to require < to be escaped in attributes.
> 
> Only *unquoted* attribute values.
> 
> 
> > > See http://bugzilla.validator.nu/show_bug.cgi?id=504
> > 
> > Shouldn't the first case say the <p attribute is invalid, thus pointing
> > right to the location of the error?
> 
> Yes but it's less clear a message than "< in an attribute name. This does not
> end the tag. Probable cause: Missing > immediately before."

Done.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 6 June 2009 02:18:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:38 GMT