public static final class EscapingConventions.NormalizeHtml extends EscapingConventions.CrossLanguageStringXform
So all HTML special characters can be escaped, except ampersand, since escaping that would lead to overescaping of legitimate HTML entities.8.2.4.3 RCDATA state
Consume the next input character:
- U+0026 AMPERSAND (&)
Switch to the character reference in RCDATA state.- U+003C LESS-THAN SIGN (<)
Switch to the RCDATA less-than sign state.- EOF
Emit an end-of-file token.- Anything else
Emit the current input character as a character token.
Modifier and Type | Field and Description |
---|---|
static EscapingConventions.NormalizeHtml |
INSTANCE
Implements the
|normalizeHtml directive. |
Modifier and Type | Method and Description |
---|---|
protected com.google.common.collect.ImmutableList<EscapingConventions.Escape> |
defineEscapes()
Returns the escapes used for this escaper.
|
escape, escape, getDirectiveName, getEscapes, getInnocuousOutput, getLangFunctionNames, getNonAsciiPrefix, getValueFilter
public static final EscapingConventions.NormalizeHtml INSTANCE
|normalizeHtml
directive.protected com.google.common.collect.ImmutableList<EscapingConventions.Escape> defineEscapes()
EscapingConventions.CrossLanguageStringXform
defineEscapes
in class EscapingConventions.CrossLanguageStringXform