htmlwhitelist library
Classes
- AttributeCollector
- Allows AttributeGenerators to modify the attributes of the tag that is being added to the copy.
- Cleaner
- Generates a DocumentFragment by applying the rules from the Whitelist that created this cleaner to the Node given.
- Uris
- Contains some utility functions to inspect uris.
- Whitelist
- Defines the rules for what tags, attribute names and attribute values are allowed in a piece of HTML.
Properties
Functions
-
setAttribute(
String name, String value) → AttributeGenerator -
Returns an AttributeGenerator that generates an attribute with the
given
name
andvalue
.
Typedefs
-
AttributeGenerator
= void Function(String tag, Map<
String, String> originalAttributes, AttributeCollector collector) -
Uses the
collector
to generate attributes for the giventag
. -
Filter
= bool Function(String tag, Map<
String, String?> attributes) -
Returns
true
if the giventag
andattributes
are accepted. - Matcher = bool Function(String name)
-
Returns
true
if the givenname
matches.