-
Notifications
You must be signed in to change notification settings - Fork 322
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
Single quotation marks inside double-quoted strings are removed #763
Comments
Thanks @chris-morgan for bringing this up. It should definitely keep single quotes. Btw, what's the method you escape inlined SVG? |
I have a habit of hand-writing SVG. Even hand-writing URL-encoded SVG. The thing is that most of the encoding that something like SVG minimisation beyond what tools like SVGO do is a bit of a hobby of mine. I know far more about it all than is good for me. |
Thanks for more details @chris-morgan. Let's fix it. |
Quotes inside data URI SVG can be unescaped and we should handle such cases correctly by leaving quoting in place.
Fixed in 3.4.14. |
Quotes inside data URI SVG can be unescaped and we should handle such cases correctly by leaving quoting in place.
Example:
This is cleaned to:
This is glaringly incorrect: it was fine to remove the double quotation marks, but definitely not to scrap the single quotation marks! The change breaks the embedded SVG.
If the
it will leave all the quotes in, but that’s not a desirable solution.
data:
URI contains)
orAs it stands, the workaround is to replace each
'
with%27
.The text was updated successfully, but these errors were encountered: