jsoup icon indicating copy to clipboard operation
jsoup copied to clipboard

Report invalid elements or attributes

Open ftrebien opened this issue 5 years ago • 2 comments

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.

ftrebien avatar Apr 21 '20 16:04 ftrebien

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

jhy avatar Jan 04 '21 10:01 jhy

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.

Sebberh avatar Mar 02 '21 10:03 Sebberh