W3C home > Mailing lists > Public > www-html@w3.org > March 2003

Re: carriage return or line feed in URI attribute values?

From: Brant Langer Gurganus <brantgurganus2001@cherokeescouting.org>
Date: Sun, 02 Mar 2003 00:48:26 -0500
Message-ID: <3E619B2A.20104@cherokeescouting.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
CC: Jim Correia <correia@barebones.com>, www-html@w3.org
Bjoern Hoehrmann wrote:

>* Jim Correia wrote:
>>What does the specification have to say about
>><a href="http://www.example.com/
>>Notice the line break in the middle of the attribute value.
>White-space is disallowed in URIs, thus the document is invalid. HTML
>4.01 does not specify how (nor if) user agents must recover from this
More specifically, any series of white space between the first 
non-whitespace character and the last non-whitespace character are 
supposed to become a single space when parsed (according to XML rules 
and probably SGML as well).  However, as Bjoern said, any whitespace is 
invalid in a URL so your HTML is not invalid, your URL is invalid.  If 
there needs to be whitespace somewhere, put it at the beginning or end 
of the attribute because is is supposed to be stripped when parsed and 
will make no difference if parsed properly.

Brant Langer Gurganus

If "Actions speak louder than words," how is that "The pen is mightier than the sword."?

Received on Sunday, 2 March 2003 00:50:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:02 UTC