Closed C0rn3j closed 6 months ago
It is meant to throw an error in this case. Your SVG is malformed, and should only work in browsers as they ignore namespaces. Can you confirm if this is the raw output from Illustrator, or did you either manually or through another tool manipulate this SVG already? 🤔
Meanwhile, you could make one of two changes to resolve the issue.
If you have any other questions or feedback, you're welcome to respond here!
Add the XLink namespace, which would be better for compatibility. You can do this be replacing the line that opens the <svg>
tag to include the XLink namespace.
<svg width="147.717pt" height="151.179pt" viewBox="0 0 147.717 151.179" xml:space="preserve" xmlns:xlink="http://www.w3.org/1999/xlink">
Replace all instances of xlink:href
with just href
. This attribute is an SVG 2 property though, and so may impact compatibility.
Judging by the fact this was Adobe Illustrator 9.0
released in 2000 I'll chalk it up to the SVG being broken due to ancient software, I did not create this.
This was svgz'd and I undid that, I can't seem to find where I even found it at this point (oxsc-app-shell.svgz
)
is 3.2.0 intended to throw this error?
Judging by https://github.com/svg/svgo/issues/1730#issuecomment-1876093453 it seems there's a plugin that can at least convert it to SVG 2.0, either this is a different bug, or the error message should be providing more information
My attempt to use https://svgo.dev/docs/plugins/remove-xlink/ led to the same error however.
zip'd file in question: test.zip
Desktop (please complete the following information):