W3C home > Mailing lists > Public > public-html@w3.org > February 2008

Unmatched quotes for attributes (was: Re: Spaces in IRIs)

From: Simon Pieters <simonp@opera.com>
Date: Sun, 03 Feb 2008 23:41:26 +0100
To: "Philip Taylor" <pjt47@cam.ac.uk>, "Sam Ruby" <rubys@us.ibm.com>
Cc: "HTML WG" <public-html@w3.org>
Message-ID: <op.t5yzzc1iidj3kv@hp-a0a83fcd39d2.belkin>

On Sun, 03 Feb 2008 14:28:35 +0100, Philip Taylor <pjt47@cam.ac.uk> wrote:

> On http://www.allmovie.com/cg/avg.dll?p=avg&amp;amp;amp;sql=1:162971 I  
> also find:
>
> <div class="bottom_tab"><a href="/cg/avg.dll?p=avg&amp;sql=34:  
> title="click for full list"><img src="/img/nr_tab.gif" alt="full  
> article" width="74" height="20px" /></a></div>
>
> which has the missing quote.

This is interesting. A validator would catch this particular case since  
click, for, full and list" are invalid attributes for <a>, but if you're  
unlucky the markup happens to match allowed attributes or you're using  
<embed> where any attribute is allowed.

Some ways to improve this situation:

   * Make lack of whitespace between attributes a parse error. (Not an  
error in
     HTML4 but authors generally think it is.)

   * Make " and ' in attribute names a parse error. (An error in HTML4.)

   * Make the empty attribute syntax conforming only for boolean attributes.
     (HTML4 allows minimization of enumerated attributes, but authors  
generally
     think it's only allowed for boolean attributes. Moreover, IE drops src
     and href attributes when using the empty attribute syntax.)

-- 
Simon Pieters
Opera Software
Received on Sunday, 3 February 2008 22:41:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:52 UTC