Treat '#' as ending data URI body content (removed)

By spec, '#' characters in data URIs should not be treated as part of the URI body, and should instead only mark the start of the URI fragment component. Historically Chrome has not adhered to the spec, instead treating '#' characters as both fragment-starters and part of the body.

Comments

This can be seen by visiting the following URL: data:text/html,<div style="height:2000px"></div><a id="foo">bar</a>#foo In a spec-compliant browser, this will render the text 'bar' at the bottom of the page, and scroll to it. In Chrome this URL will both render the text 'bar#foo' and still scroll to it! Violating the spec has caused web-compat problems; a common pattern is web-developers writing inline SVG data in a CSS url(), such as the following: content: url('data:image/svg+xml;utf8,<svg

Demo

Specification

Established standard

Status in Chromium

Blink>Loader


Removed (tracking bug) in:

  • Chrome for desktop release 72
  • Chrome for Android release 72
  • Android WebView release 72

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Shipped
  • No public signals
  • No public signals
  • No signals

Owner

Last updated on 2018-11-27