Skip to content

Support unquoted attributes #25

@vzaidman

Description

@vzaidman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions