From a158cc81aea7df5bc9994ed194395135c5741021 Mon Sep 17 00:00:00 2001 From: spiralofhope <492880+spiralofhope@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:15:04 -0800 Subject: [PATCH] res: prepend XML line to SVG files, to pass strict svg checks (#9226) 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. --- res/terminal/Terminal.svg | 1 + res/terminal/Terminal_Dev_HC.svg | 1 + res/terminal/Terminal_HC.svg | 1 + 3 files changed, 3 insertions(+) diff --git a/res/terminal/Terminal.svg b/res/terminal/Terminal.svg index e8f2461c1..2a50f0f14 100644 --- a/res/terminal/Terminal.svg +++ b/res/terminal/Terminal.svg @@ -1,3 +1,4 @@ + diff --git a/res/terminal/Terminal_Dev_HC.svg b/res/terminal/Terminal_Dev_HC.svg index e2219a49e..03dee3be7 100644 --- a/res/terminal/Terminal_Dev_HC.svg +++ b/res/terminal/Terminal_Dev_HC.svg @@ -1,3 +1,4 @@ + diff --git a/res/terminal/Terminal_HC.svg b/res/terminal/Terminal_HC.svg index e5e3a5434..8e2d23806 100644 --- a/res/terminal/Terminal_HC.svg +++ b/res/terminal/Terminal_HC.svg @@ -1,3 +1,4 @@ +