New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svgo doesn't remove sodipodi:*** attributes #442
Comments
Thanks for reporting! Added the namespace. |
v0.6.0 with the fix have been just released. |
Thanks for making this! Awesome savings on so many of my SVG's. But are you sure this issue hass been fixed? I just installed SVGO for the first time and tried it on an illustrator file that had lots of sodpodi's.
$ npm show svgo version
|
Since the error in parsing, your file is already broken. SVGO can't do anything until it parse file. |
I have same error with |
|
I hadn't this error when I used same svg without svgo. Anyway, removing prefixes solved this problem. |
@GreLI AFAIK a namespace prefix is only valid if the svg has a xmlns binding that prefix to a unique DTD. So if svgo removes the xmlns, it should also remove the corresponding prefix from the elements/attributes, otherwise the svg file is invalid (I'm not 100% sure on this, but that's my understanding). In any case, according to the inkscape wiki, sodipodi-prefixed attributes and elements are metadata, rather than graphical information needed to render the image, so svgo should remove not just the prefix, but the whole attribute/element as well. |
$ svgo -v
$ cat bulb.svg
$ svgo bulb.svg
$ cat bulb.svg
$ svgo bulb.svg
In fact it produces malformed xml.
The text was updated successfully, but these errors were encountered: