Closed ianmstew closed 8 years ago
Yes, that's right. This section was really lost.
Thank you @ianmstew !
Thank you for an excellent library! The svgo integration is perfect.
Only because of such good pull requests! Try 2.1.2 version.
:+1: Works perfectly!
I noticed that when a source SVG has a
<style>...</style>
block, the final sprite only includes empty<style></style>
tags (no text content). I tracked down the issue to thesymbols-childs.jade
mixin. If you approve, I would love to see this fix in a release shortly because I have chosen this webpack plugin for production use. :)Note that I chose to always use
CDATA
XML escapes for text content due to a recommendation from the W3C for escaping embedded style sheets within SVG: https://www.w3.org/TR/SVG/styling.html#StyleElementExample. In my implementation, the CDATA escape will apply to ALL text nodes, not only those located within a style tag. I think this is safest, though, because the underlying DOM parser seems not to track whether CDATA escapes were used to escape the original text, and a stray angle bracket could throw off SVG parsing.