Replies: 1 comment 1 reply
-
|
Hi there, It's definitely possible to use jsoup to do this. But there is not a canned Safelist for SVGs; you will need to configure that directly. See docs: Cookbook - Safelist Sanitizer as introduction Note that I'm not vouching for the "safety" of all those elements and attributes; just that jsoup will sanitize SVG elements according to the rules defined in what you're defining as safe in the safelist (aka allow-list). Cheers, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Hope you are doing well.
I saw few recent changes about parsing xml content.
I have a use case where i want to validate and sanitize svg xml image content.
i tried all my ways to make it work, but no luck. after using cleaner the cleaned document body always empty.
i have a doubt not that is it possible to use jsoup for sanitizing svg content ?
or is there any other better ways or alternative to sanitize svg content ?
below is my sample code snippet shows my use case.
I really appreciate any help on this please.!
Kindly let me know if you need any more details.
Thank in advance!
Ram
Beta Was this translation helpful? Give feedback.
All reactions