pub fn normalize_attribute_value<'input, 'entity, C, E, F>(
value: &'input str,
depth: usize,
is_normalization_char: C,
normalize_eol_step: E,
resolve_entity: F,
) -> Result<Cow<'input, str>, EscapeError>Expand description
Returns the attribute value normalized as per the XML specification, using a custom entity resolver.
Do not use this method with HTML attributes.
Escape sequences such as > are replaced with their unescaped equivalents,
and the characters \t, \r, \n are replaced with a space. This allocates
unless the raw attribute value does not require normalization.
ยงParameters
value: the unnormalized attribute value;depth: maximum number of nested entities that can be expanded beforeEscapeError::TooManyNestedEntitiesis returned;is_normalization_char: predicate reporting whether a byte begins a character requiring normalization (UTF-8 encoding assumed);normalize_eol_step: a function performing EOL normalization of a character;resolve_entity: a function to resolve named entities.