Skip to content

Report invalid elements or attributes #1360

@ftrebien

Description

@ftrebien

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions