We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would it be possible to include the HTML5 Tags details and summary in Safelist.relaxed?
details
summary
Safelist.relaxed
https://developer.mozilla.org/de/docs/Web/HTML/Element/details
Or are there reasons why those two tags cannot be considered safe?
The text was updated successfully, but these errors were encountered:
Apologies if this is already widely known, but if anyone would like to add their own safe HTML tags for current Jsoup versions, Safelist.addTags("stringTag1","stringTag2") is available. I've included an example below. https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/safety/Safelist.java#L222
String cleanRelaxedIncludeHtmlDetailsSummary() throws IOException { Safelist listOfSafeHtml = Safelist.relaxed().addTags("details","summary"); String htmlWithDetailsSummary = "<details><summary>Details</summary>Something small enough to escape casual notice.</details>"; String afterCleanedRelaxedHtml = Jsoup.clean(htmlWithDetailsSummary, listOfSafeHtml); return afterCleanedRelaxedHtml; }
Sorry, something went wrong.
No branches or pull requests
Would it be possible to include the HTML5 Tags
details
andsummary
inSafelist.relaxed
?https://developer.mozilla.org/de/docs/Web/HTML/Element/details
Or are there reasons why those two tags cannot be considered safe?
The text was updated successfully, but these errors were encountered: