Re: equals sign in unquoted attribute

On Tue, 14 Jul 2009, Lachlan Hunt wrote:
> Ian Hickson wrote:
> > On Fri, 19 Jun 2009, Simon Pieters wrote:
> > > I think the spec should allow = in unquoted attribute values again,
> > > because it seems annoying to have to quote href attributes when the URL
> > > has an =.
> > > 
> > > The authoring mistakes that banning the = was intended to catch are
> > > almost always caught by other errors, I think.
> > 
> > <img src=foo.jpeg alt= class=photo>
> 
> Sure, there are edge cases that occur with almost every conformance decision
> we make.  It's a trade off.  It just depends whether you think it's more
> valuable to catch errors like that, or to allow something much more common
> like this, copied from google.com:
> 
> <a href=/advanced_search?hl=en>Advanced Search</a>
> 
> Or maybe we can find a solution that works for both scenarios.  I'm not 
> sure what might work, though, at least not without making the parsing 
> much more complex.

I think it's better to catch these errors than allow quote omission in 
those edge cases.


On Tue, 14 Jul 2009, Simon Pieters wrote:
> 
> We could set a flag when seeing whitespace in the before attribute value 
> state, and then check the flag when seeing = in the unquoted attribute 
> value state. It would make parsing more complex for parsers that report 
> parse errors, but not much more complex.
> 
> <a b= c=d> and <a b==c> would be in error but <a b=c=d> not.

That's far too confusing IMHO.

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

Received on Wednesday, 29 July 2009 00:47:19 UTC