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

Fix striptags to clean HTML instead of parsing #733

Merged
merged 2 commits into from
Aug 19, 2021
Merged

Conversation

mattcoley
Copy link
Collaborator

@mattcoley mattcoley commented Aug 19, 2021

Jsoup parse has a problem. If you input escaped HTML text &lt;div&gt;test&lt;/test&gt; it will not recognize the escaped HTML tags, parse to HTML text, and then output the unescaped version <div>test</div> allowing for XSS. This utilizes the Jsoup clean method which just strips all tags from the input and escapes any HTML entities.

@mattcoley mattcoley requested a review from jasmith-hs August 19, 2021 18:25
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

Successfully merging this pull request may close these issues.

2 participants