-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDATA in SVG script causing trouble #88
Comments
It is also possible that |
Update: I think I found the issue. It actually has nothing to do with svgo. A potential solution is to exclude |
Thanks for the detailed info! I'll look into it in the following days. |
For now, I've found no better solution than check for @Scrum if I have a node (e.g., |
It might be a good idea to check for namespace switching instead of hard-coding for I'm thinking of the possibility of some other element using a strict XML syntax for its internal DOM just like SVG, although I cannot come up with a concrete example at the moment. |
The version ofsvgo
used byhtmlnano
has issues with parsing script tags.When using both
minifyJS
, andminifySvg
, there's an issue with parsingscript
tags insidesvg
tags.Specifically,
CDATA
declaration is removed when it is necessary:is parsed into:
This causes SVGs like this to fail validation:
with the error:
This is not an issue of svgo:
returns:
The text was updated successfully, but these errors were encountered: