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

Report invalid elements or attributes #1360

Open
ftrebien opened this issue Apr 21, 2020 · 2 comments
Open

Report invalid elements or attributes #1360

ftrebien opened this issue Apr 21, 2020 · 2 comments
Labels

Comments

@ftrebien
Copy link

The Cleaner class today uses the protected methods isSafeTag and isSafeAttribute to determine whether a tag or attribute is valid according to the provided whitelist. Those methods are not directly available to the application using Jsoup. To provide better feedback to whoever provided a document, it would be interesting to determine easily which tags and attributes invalidate a specific document. Maybe, in addition to keeping count of removed elements and attributes, the cleaner could also keep and provide a list of those things if requested.

@jhy
Copy link
Owner

jhy commented Jan 4, 2021

I like this idea, and could be similar to the error tracking option in the HTML parser.

@jhy jhy added the feature label Jan 4, 2021
@Sebberh
Copy link

Sebberh commented Mar 2, 2021

Hi, we are a student group and we would like to take a crack at this. Can't guarantee that we'll be able to complete it with high enough quality but we'll like to try.

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