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

Re: equals sign in unquoted attribute

From: Simon Pieters <simonp@opera.com>
Date: Tue, 14 Jul 2009 21:21:45 +0200
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Ian Hickson" <ian@hixie.ch>
Cc: "public-html@w3.org" <public-html@w3.org>
Message-ID: <op.uw2n2eaaidj3kv@simon-pieterss-macbook.local>
On Tue, 14 Jul 2009 16:39:57 +0200, Lachlan Hunt  
<lachlan.hunt@lachy.id.au> 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.

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.

Simon Pieters
Opera Software
Received on Tuesday, 14 July 2009 19:22:46 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:51 UTC