Closed bkastl closed 9 years ago
We'll need to make sure the file is really us-ascii encoded. See PR: https://github.com/gavro/gulp-iconify/pull/4
So we will need to add the string replace functions from svg-uri-encoder as well, see: https://github.com/filamentgroup/directory-encoder/blob/master/lib/svg-uri-encoder.js
Didn't happen in my testcase because files where preprocessed by svgo. Will look at it.
Perhaps this PR is fine. Can't seem to find a testcase which breaks it :+1: (probably because all SVGs are passed through svgo (in the same normalizeSVGs callback).
Can you think of any use-cases where a faulty char might slip through?
Well, I've found a edge case: if you are using a svg with a text node that has spaces / tabs inside, the generated svg will be invalid.
Rest works fine.
Will look at it tomorrow. Closing for now.
The generated svg css files are not compatible with grunticons embed option. By switching the decoding they can be embedded by the grunticon javascript loader (data-grunticon-embed).
Compatibility tested in firefox, chrome, safari and ie11.