[whatwg] Stripping newlines from URI attributes

Philip Taylor excors+whatwg at gmail.com
Thu Jul 30 07:04:01 PDT 2009


On Thu, Jul 30, 2009 at 2:37 PM, Elliotte Rusty
Harold<elharo at ibiblio.org> wrote:
> On Wed, Jul 29, 2009 at 5:49 PM, Kartikaya
> Gupta<lists.whatwg at stakface.com> wrote:
>> It seems that most browsers do some sort of newline and tab removal from URI attributes. For example, if you have
>>
>> <img src="foo
>> bar.jpg">
>>
>> browsers will still render the image called "foobar.jpg" despite the CRLF pair in the middle of the src attribute.
> [...]
>
> This is an area where we should not attempt (and probably simply
> cannot) maintain compatibility with existing browsers. They're just
> too broken.

We should attempt to maintain compatibility with existing content, and
whitespace in URI attributes seems very common in existing content,
e.g.:

http://www.topdogphotos.com/photo-gallery/gallery11.html (newlines in
<a href>, <img src>)

http://www.sprig.com/coyuchi_george_or_thor_hooded_baby_towel (tabs
and &#xD;&#xA; in <img src>)

and loads more.

-- 
Philip Taylor
excors at gmail.com



More information about the whatwg mailing list