-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support unquoted attributes #678
Comments
This error actually comes from the SAX parser that is parsing the SVG. |
Sax now provides a separate option so that we can allow unquoted attributes while in strict mode. Reference:
However, I'm wondering if this really makes sense in the context of SVGO. Would you be able to share how you obtained this SVG with unquoted attributes? 🤔 For example, if it was handwritten, or created with tooling that no longer produced the erroneous output, then I'd be reluctant to enable the option. However, if it was created by a notable software/project that still has this behavior, then by all means I'd be happy to toggle it. Just not sure if this makes sense in the context of SVGs. |
I'll close this for now due to the lack of a response, but anyone is welcome to chime in or open a new issue on the topic when they're available to elaborate. |
if you have svgs with unquoted attributes such as:
xmlns="http://www.w3.org/2000/svg" width=20px height=20px
The error:
Error in parsing SVG: Unquoted attribute value
is emitted.I've created a loader to temporary fix this in webpack:
https://www.npmjs.com/package/xml-fix-loader
The text was updated successfully, but these errors were encountered: