Inline SVG with sanitization enabled outputs XML declaration

Created on 22 May 2022, about 2 years ago
Updated 20 February 2023, over 1 year ago

Problem/Motivation

When using the "Output SVG inline" option and the "Sanitize SVG code" option together, the field formatter outputs an XML declaration, wich causes an HTML validation error.

Steps to reproduce

Use "Output SVG inline" with "Sanitize SVG code" enabled. Take a look at the HTML DOM. There will be a XML declaration before the svg tag like:
<!--?xml version="1.0" encoding="UTF-8"?-->

Validate the markup with a validator like e.g. https://validator.w3.org/ and you will get the error: "Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)"

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Corn696 Flensburg

Live updates comments and jobs are added and updated live.
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.69.0 2024