Whitelist attributes(tags, attributes, { Filter when })

Creates a new Whitelist with additional allowed attributes for the given tags that will be copied from the source.

The tags and attributes can be one of the following types:

  • String containing a tag name or attribute name;
  • Iterable<String> containing tag names or attribute names;
  • Matcher.

If when is provided, the attribute will only be copied if when applies. Only if both tags and attributes match will when be invoked.

Source

Whitelist attributes(dynamic tags, dynamic attributes, {Filter when});