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

Re: Whitespace in attribute values

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 27 Jun 2008 23:59:22 +0000 (UTC)
To: Andrew Sidwell <w3c@andrewsidwell.co.uk>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0806272344170.17498@hixie.dreamhostps.com>

On Sat, 24 May 2008, Andrew Sidwell wrote:
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Ca%20href%3D%22%20%20%20http%3A%2F%2Fgoogle.com%2Fsearch%3Fq%3Dhello%20%20world%20%20%20%20%20%22%20class%3D%22%20%20%20raga%20taga%20%20%20%20%22%20new%3D%22%20%20%20raga%20%20haga%20%20%22%3Emeow%3C%2Fa%3E%0A
> 
> <!DOCTYPE html>
> <a href="   http://google.com/search?q=hello  world     "
>    class="   raga taga    " new="   raga  haga  ">meow</a>
> 
> I can't find anywhere in the spec which defines how to deal with 
> whitespace in attribute values.  Special handling seems to be in 
> browsers for the "href" and "class" attributes, and more general 
> handling in others. [...]
> 
> This isn't much of an interoperability issue except in the case of the 
> href attribute.  When following the href attribute, all browsers remove 
> at least any leading or trailing whitespace and URL-encode the rest, 
> even if the DOM has some leading/trailing whitespace.  Behaviour in this 
> case should be defined.

This should not be pretty well-defined.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 27 June 2008 23:59:58 UTC

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