Rethink Validator SafeHtml design to support custom "WhiteListType"

Description

The underlying JSoup html validation framework is much more powerful than the current implementation of the SafeHtml Validator allows. Instead of using a fixed enumeration the Whitelist class itself should be provided as an attribute to the validator. Use case:

Providing rich-html content where it is sometimes necessary to float some components/images on the right side next to the text I tried to allow the tag "div" and used the straightforward "additionalTags" attribute just to realize in the next step there is no way I can add the attributes "class" or "style" to it (in general or restricted to "div").

Without those attributes my "div" is useless.

Environment

None

Status

Assignee

Unassigned

Reporter

Marco Janc

Labels

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure