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

Michal Zalewski lcamtuf at coredump.cx
Mon Sep 12 13:48:18 PDT 2011

[ 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.


More information about the whatwg mailing list