Skip to content

Double encoding with datauri #997

@norganna

Description

@norganna

It appears that the data uri is getting double encoded.

I have performed stack trace at the top of tools.js encodeSVGDatauri at both times.

The first is getting called:

at optimizeOnceCallback (svgo/lib/svgo.js:46:38)
at svgo/lib/svgo.js:67:9
at SAXParser.sax.onend (svgo/lib/svgo/svg2js.js:169:13)
at emit (svgo/node_modules/sax/lib/sax.js:624:35)
at end (svgo/node_modules/sax/lib/sax.js:667:5)
at SAXParser.write (svgo/node_modules/sax/lib/sax.js:975:14)
at SAXParser.close (svgo/node_modules/sax/lib/sax.js:157:38)
at module.exports (svgo/lib/svgo/svg2js.js:182:28)
at module.exports.SVGO._optimizeOnce (svgo/lib/svgo.js:59:5)

The second:

at svgo/lib/svgo/coa.js:396:27
at process._tickCallback (internal/process/next_tick.js:68:7)

I have commented out the line in coa.js and it appears to work fine for me but I'm not sure if this is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions