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

Julian Reschke julian.reschke at gmx.de
Tue Oct 9 07:59:24 PDT 2012

On 2012-10-09 13:51, Anne van Kesteren wrote:
> On Tue, Oct 9, 2012 at 1:50 AM, Ian Hickson <ian at hixie.ch> wrote:
>> On Sat, 10 Sep 2011, Daniel Holbert wrote:
>>> I'm writing with a proposal to improve the handling of "#" in data URIs.
>>> I'm particularly looking for feedback from other browser vendors, but of
>>> course feedback from others is welcome as well. [...]
>> Anne has since tried to respec URL parsing in detail, with the work in
>> progress being here:
>>     http://url.spec.whatwg.org/
>> I recommend checking that spec to see if it does what you want, and if
>> not, working with Anne to see if it can be adjusted accordingly or if
>> something else needs to happen.
> This is not written down explicitly just yet, but for data URLs I
> think we want the fragment to *not* be part of the actual resource,
> but rather as an input to the resource so things like
> data:text/html,<style>:target{background:lime}</style><p id=x>test#x
> work. (Fails in Chrome, but works fine in Opera and Firefox already.)

Clarifying: that sounds like making it parse just like in any other URI 
(with which I would agree).

The test case at


seems to imply that Opera doesn't do this right yet, though. (tested 
with 12.02)

Best regards, Julian

More information about the whatwg mailing list