Skip to content
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 #25

Closed
vzaidman opened this issue Mar 9, 2017 · 1 comment
Closed

Support unquoted attributes #25

vzaidman opened this issue Mar 9, 2017 · 1 comment

Comments

@vzaidman
Copy link

vzaidman commented Mar 9, 2017

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:
https://www.npmjs.com/package/xml-fix-loader

{
  test: /\.svg$/,
  use: [
    { loader: 'file-loader' },
    { loader: 'xml-fix-loader' }
  ]
}
...
plugins: [
  ...
  new ImageminPlugin()
]

Also opened a bug on svgo:
svg/svgo#678

@Klathmon
Copy link
Owner

Unfortunately there is nothing I can do to to fix this in my package.

Thanks for making an issue with SVGO, and I'll add a note about this to the readme as I think this actually fixes another issue I have open here.

I appreciate the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants