[PR #9226] res: prepend XML line to SVG files, to pass strict svg checks #27487

Open
opened 2026-01-31 09:22:14 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/9226

State: closed
Merged: Yes


A header line is missing from a few .svg files, denying their use (via
a security error) in WordPress (if svg support is enabled). The upload
is rejected even though the web browser could display the image if it
were dragged into its own tab.

The .svg images appear to have been edited at different times and with
different tools. Their contents are in a different style. Two of them
are beautiful and the rest do not follow suit and do not function the
same.

I don't know enough to make them all the same style, but changes can be
made to three of them to make them work the way I was expecting (see
below).

Validation Steps Performed

  • Perform the change with a text editor
  • Open a new WordPress post page
  • Drag-and-drop the changed file into that WordPress edit box
  • (The WordPress media upload dialog appears and the file is uploaded)
  • Confirmed that the file does not trigger a "security error" (as seen
    at the top of the right-hand column)
  • Confirmed that the image appears as a thumbnail preview

Terminal_Pre_HC.svg is not fixable in this way, and I don't understand
svg well enough to troubleshoot easily.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9226 **State:** closed **Merged:** Yes --- A header line is missing from a few `.svg` files, denying their use (via a security error) in WordPress (if svg support is enabled). The upload is rejected even though the web browser could display the image if it were dragged into its own tab. The `.svg` images appear to have been edited at different times and with different tools. Their contents are in a different style. Two of them are beautiful and the rest do not follow suit and do not function the same. I don't know enough to make them all the same style, but changes can be made to three of them to make them work the way I was expecting (see below). ## Validation Steps Performed - Perform the change with a text editor - Open a new WordPress post page - Drag-and-drop the changed file into that WordPress edit box - (The WordPress media upload dialog appears and the file is uploaded) - Confirmed that the file does not trigger a "security error" (as seen at the top of the right-hand column) - Confirmed that the image appears as a thumbnail preview `Terminal_Pre_HC.svg` is not fixable in this way, and I don't understand svg well enough to troubleshoot easily.
claunia added the pull-request label 2026-01-31 09:22:14 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27487