-
Notifications
You must be signed in to change notification settings - Fork 93
Broken output when transforming Debian Openlogo due to 'undefined entity' #240
Comments
Yes, entities are a bit broken. |
This is based on my (i.e. user not developer) input, with "safe options" I mean that it does hardly remove anything that might be useful (for editing). If you change I personally use a different option I use https://github.com/JoKalliauer/cleanupSVG/blob/master/pre.sh#L140: PS: Inkscape does also not understand To avoid this issue I recommend to open https://www.debian.org/logos/openlogo-nd.svg in Firefox 89.0.2 (not in Chromium) and press |
Why don't you invent |
Because you cannot preserve entities. Just like CSS. |
svgcleaner version
Current master, commit 3b64db0
Input:
https://www.debian.org/logos/openlogo-nd.svg
svgcleaner command:
Used the "safe options" I saw a link too in another issue here:
https://commons.wikimedia.org/wiki/User:JoKalliauer/Optimization#svgcleaner
svgcleaner openlogo-nd.svg debian-swirl-openlogo.bad.svg --indent 1 --resolve-use no --convert-shapes no --group-by-style no --join-arcto-flags no --join-style-attributes no --remove-comments no --remove-declarations no --remove-invisible-elements no --remove-metadata no --remove-nonsvg-attributes no --remove-nonsvg-elements no --remove-text-attributes no --remove-title no --remove-unreferenced-ids no --trim-ids no --ungroup-groups no --list-separator comma
The tool exits OK, only output I see is:
Your image is 22.51% smaller now.
Expected Outcome:
Smaller working SVG
Observed Outcome:
Smaller but broken SVG
When opening this in Firefox 89.0.2
When opening in Chromium:
Did not bother with any further SVG capable viewer, as web is where this would end up anyway.
Manual fixing
The metadata's VariablSets seems to be cleaned up in an broken way, from original:
to belows:
If I delete the line with
<v:sampleDataSets xmlns:v="&ns_vars;"/>
the SVG is rendered OK again.The text was updated successfully, but these errors were encountered: