W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Proposal for improved handling of '#' inside of data URIs

From: Michal Zalewski <lcamtuf@coredump.cx>
Date: Mon, 12 Sep 2011 13:48:18 -0700
Message-ID: <CALx_OUDM-NCHYZQ=gtwfKL-4Dr2or6gJTR=iF5me1W6wRxnTzQ@mail.gmail.com>
[ Julian Reschke ]

> Observation: javascript: IMHO isn't a URI scheme (it just occupies a place
> in the same lexical space), so maybe the right thing to do is to document it
> as historic exception that only exists in browsers.

In one of its modes, it's roughly equivalent to data:
(javascript:"<h1>foo"), so I'm not sure the distinction is really that

> Maybe. Or it makes sense to do it one at a time :-).

My only concern is that treating them separately had some funny side
effects in the past - for example, right now, the origin inheritance
for documents created from about:blank, data:.., and javascript:...
URLs are completely different in current implementations, for no good

[ Daniel Holbert ]

> However, fragment identifiers don't have any special significance in "javascript:" URIs, so the "javascript:"
> handler ends up requesting the full URI, ignoring any distinction between the pre-# and post-# part.

In the above use case, you could imagine # having the same purpose as
for data, in principle.

Received on Monday, 12 September 2011 13:48:18 UTC

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