This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28600 - Not supporting fragment identifiers on at least data: URIs (but probably also about:blank and others) is not web-compatible
Summary: Not supporting fragment identifiers on at least data: URIs (but probably also...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-04 14:14 UTC by Boris Zbarsky
Modified: 2015-06-15 17:25 UTC (History)
2 users (show)

See Also:


Attachments

Description Boris Zbarsky 2015-05-04 14:14:01 UTC
Consider this testcase:

  var url = new URL("#foo", "data:text/html,"); alert(url.spec);

Per spec, this should fail.  Per browsers and reality, "data:text/html#foo" is alerted.

See https://bugzilla.mozilla.org/show_bug.cgi?id=308590 for why the web depends on this behavior.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1157953 for why we probably want a similar behavior for "about:blank" as base URL.

There may be other non-relative schemes or particular URIs from those schemes (maybe even all?) that want this behavior.