[Webkit-unassigned] [Bug 68089] WebKit doesn't parse "#" as delimiter for fragment identifier in data URIs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 19 04:30:18 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68089


Henry S. Thompson <ht at inf.ed.ac.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ht at inf.ed.ac.uk




--- Comment #29 from Henry S. Thompson <ht at inf.ed.ac.uk>  2011-10-19 04:30:17 PST ---
(In reply to comment #18)

> . . .

> > When you do that it would be good if you can describe how relative URIs should work in data: URIs.
> 
> It's pretty simple:
> 
> 1) If the relative URL is an absolute URL, then the resolved URL is that absolute URL (appropriately canonicalized).
> 
> 2) Otherwise, the resolved URL is an invalid URL.
> 
> Separately, trying to navigate to an invalid URL results in a navigation to about:blank.
> 
> In the spec, this is marked as a TODO:
> 
>         <t>TODO: If base-url's scheme is not hierarchical, we can't resolve as
>         a relative URL.  We'll probably want to return an invalid URL.  Check
>         what happens when resolving an empty string as a relative URL with a
>         non-hierarchical base.</t>
> 
> From the point of view of the spec, data URLs are not hierarchical, which essentially means we parse out the scheme and leave the remainder of the URL to be parsed by a scheme-specific parser.

I think we have to be careful here to distinguish relative URIs in general from same-document references.  I claim that same-document references (and all the examples of relative data: URIs we've seen so far _are_ same-document references) _may_ make sense for non-hierarchical URI schemes, and should not be treated as errors.

So, for example, clicking on the link in that appears at the beginning of the result of interpreting

 data:application/xhtml+xml,<html xmlns='http://www.w3.org/1999/xhtml'><a href='#target'>go green</a><div style='height:3000px; width: 300px; background: red'/><div id='target' style='height: 3000px; width: 300px; background: green;'/></html>

should work, IMO.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list