Skip to content

(#1471): base64-encode included SVGs to avoid mis-escaped characters

We wrap SVG data from icons within another SVG with extra styling information. The wrapped SVG may contain characters that cannot be part of a data: URL (https://fetch.spec.whatwg.org/#data-urls).

Librsvg 2.45 got more strict in its parsing of data: URLs; whereas previously it ignored '#' characters in them, now it considers them to be the start of a fragment identifier, which is not allowed in data: URLs anyway.

To avoid unallowed characters, we now create a data: URL with a base-64 encoded SVG.

Fixes #1471 (closed)

Merge request reports