Skip to content
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

Stripping SVG files #1

Open
mmc41 opened this issue Dec 13, 2016 · 2 comments
Open

Stripping SVG files #1

mmc41 opened this issue Dec 13, 2016 · 2 comments

Comments

@mmc41
Copy link

mmc41 commented Dec 13, 2016

Thanks a a cool library. I am interested in stripping embedded javascript from SVG (standalone or SVG embedded in HTML). Is that something that strip-js supports or aim to support ?

@shivanshu3
Copy link
Owner

It should. Do you have a specific example you can provide so I can test it just to be sure?

@shivanshu3
Copy link
Owner

Actually, no, I take it back. I tested with a simple SVG and it worked, but with a more complex SVG it corrupted it (although successfully removed all JavaScript from it). The reason is because this module sanitizes HTML before stripping out JavaScript, and can't handle generic XML tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants