public static final class EscapingConventions.FilterImageDataUri extends EscapingConventions.CrossLanguageStringXform
Developers use this simultaneously to allow data URI's, but also to ensure that the image tag won't initiate any HTTP requests.
NOTE: We may consider deprecating this now that img/data URIs are allowed by default, since it's unlikely too many projects need a mechanism to double-check that images are only loaded from data URIs; anyone else that does can simply scan the URL and fail if it detects http/https.
| Modifier and Type | Field and Description |
|---|---|
static EscapingConventions.FilterImageDataUri |
INSTANCE
Implements the
|filterImageDataUri directive. |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.collect.ImmutableList<EscapingConventions.Escape> |
defineEscapes()
Returns the escapes used for this escaper.
|
String |
getInnocuousOutput()
Returns an innocuous string in this context that can be used when filtering.
|
escape, escape, getDirectiveName, getEscapes, getLangFunctionNames, getNonAsciiPrefix, getValueFilterpublic static final EscapingConventions.FilterImageDataUri INSTANCE
|filterImageDataUri directive.protected com.google.common.collect.ImmutableList<EscapingConventions.Escape> defineEscapes()
EscapingConventions.CrossLanguageStringXformdefineEscapes in class EscapingConventions.CrossLanguageStringXformpublic String getInnocuousOutput()
EscapingConventions.CrossLanguageStringXformgetInnocuousOutput in class EscapingConventions.CrossLanguageStringXform