gavro / gulp-iconify

'A mystical CSS icon solution', grunticon-like build system.
MIT License
50 stars 22 forks source link

Fix SVG DATA for FF and IE #4

Closed hadronix closed 9 years ago

hadronix commented 9 years ago

FF and IE doesn't support plain embed SVG Code, uri encoding is necessary :-) first testing looks really fine, the guys from filamentgroup did something more, their are using the US-ASCII encoding for the embeded, encoded svg data

gavro commented 9 years ago

Hmm, nice find, did not know that.. Thnx!

Filamentgroup is indeed doing a lot more: https://github.com/filamentgroup/directory-encoder/blob/master/lib/svg-uri-encoder.js

I guess why they are doing that is to make sure the encoding is always correct. Input can be any encoding, lots of replacements are applied to cast it to US-ASCII. It might be safer, but is it really necessary? I'll merge this PR for now :)