Support data URIs

Created on 15 November 2011, about 13 years ago
Updated 20 April 2024, 7 months ago

http://en.wikipedia.org/wiki/Data_URI_scheme

Drupal doesn't consider data URIs to be valid as they take the form 'data:' instead of 'data://'.

file_uri_scheme() can't be changed to have ':' as the delimiter instead of '://' as that function also accepts relative paths and automagically determines that it is not a URI. Paths can have ':' in them, so this patch tests explicitly for URIs starting with 'data:'.

It is bad practise for functions to be determining what has been passed to them. Perhaps this can be fixed properly in a wider refactoring.

This patch also includes full tests for data URIs.

📌 Task
Status

RTBC

Version

7.0 ⚰️

Component
File system 

Last updated about 11 hours ago

Created by

🇬🇧United Kingdom jbrown

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024