svgo icon indicating copy to clipboard operation
svgo copied to clipboard

Removed call to encodeSVGDatauri() from coa.js and added test case.

Open johnkenny54 opened this issue 1 year ago • 3 comments

encodeSVGDatauri() is called within the optimize() function, but was being called a second time in coa.js when SVGO was run from the command line, giving a doubly-encoded, incorrect result.

This PR removes the call from coa.js and adds a test case.

Resolves #2048 resolves #997.

johnkenny54 avatar Aug 05 '24 22:08 johnkenny54

Actually, for current web browsers the only symbol needs to be escaped is “#”. Maybe it worth optimize data uri encoding…

GreLI avatar Aug 07 '24 19:08 GreLI

Optimizing encodeSVGDatauri() would be a separate issue. This PR only addresses removing the duplicate call, which, as described in the related issue, completely breaks the feature from the command line.

johnkenny54 avatar Aug 09 '24 16:08 johnkenny54

True. Just noted here.

GreLI avatar Aug 09 '24 19:08 GreLI