W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] Stripping newlines from URI attributes

From: Philip Taylor <excors+whatwg@gmail.com>
Date: Thu, 30 Jul 2009 15:04:01 +0100
Message-ID: <ea09c0d10907300704i7889dfefp58f4dc904c96010b@mail.gmail.com>
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,

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
Received on Thursday, 30 July 2009 07:04:01 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC