HTML escape modes.
Allows specifying a mode for HTML escaping that depend on the context where the escaped result is going to be used. The relevant contexts are:
- as text content of an HTML element.
- as value of a (single- or double-) quoted attribute value.
All modes require escaping of &
(ampersand) characters, and may
enable escaping of more characters.
Custom escape modes can be created using the HtmlEscapeMode.HtmlEscapeMode constructor.
Constants
- ATTRIBUTE → HtmlEscapeMode
-
const
const HtmlEscapeMode._('attribute', true, true, false, false)
- ELEMENT → HtmlEscapeMode
-
const
const HtmlEscapeMode._('element', true, false, false, false)
- SQ_ATTRIBUTE → HtmlEscapeMode
-
const
const HtmlEscapeMode._('attribute', true, false, true, false)
- UNKNOWN → HtmlEscapeMode
-
const
const HtmlEscapeMode._('unknown', true, true, true, true)
Properties
- escapeApos → bool
-
read-only
- escapeLtGt → bool
-
read-only
- escapeQuot → bool
-
read-only
- escapeSlash → bool
-
read-only
- hashCode → int
-
Get a hash code for this object.…
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Constructors
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.…
inherited -
toString(
) → String -
Returns a string representation of this object.