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

Double encoding with datauri #997

Open
norganna opened this issue Jul 10, 2018 · 1 comment · May be fixed by #2053
Open

Double encoding with datauri #997

norganna opened this issue Jul 10, 2018 · 1 comment · May be fixed by #2053

Comments

@norganna
Copy link

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.

@johnkenny54
Copy link
Contributor

This looks like a duplicate of #2048, resolved by PR #2053.

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

Successfully merging a pull request may close this issue.

2 participants