Open pixeltherapy opened 10 years ago
Yes and no (concerning scope), this is also a known issue with htmlparser2. It has no full support for all SVG elements (yet). But since SVG is not user-defined it should be doable to create a parser that correctly parses all SVG elements. As you can see https://github.com/fb55/htmlparser2/issues/79, I've ran into the issue myself as well. Like #23 this issue is more suited for htmlparser2/domparser.
However, i'll keep this one open. I haven't got the time myself to implement/extend the parser, but perhaps others can chip in?
I agree, it is very doable and hardly earth-shattering as issues go.
Thanks for the link to htmlparser2, I'll have a look and see if I can contribute, because, y'know I'm all about that SVG. Will update here with any significant progress/updates.
Sounds good, will keep an eye out and perhaps chip in some time as well
In the same vein as #23 but with a common use scope, certain inline SVG elements are breaking due to changes in self-closing tags. In this case 'quotes:true' is optioned to prevent breaking of fill declarations, e.g. fill="url(#foo)".
Source:
Output :
While this effects many SVG elements it does not seem to break primitives such as <rect /> and <circle />, no doubt these elements are a little more robust.