| Package | Description |
|---|---|
| com.google.template.soy.data |
Java representation of Soy data types.
|
| com.google.template.soy.shared.restricted | |
| com.google.template.soy.tofu |
Java Object backend (a.k.a. Tofu).
|
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContent |
SanitizedContents.concatHtml(SanitizedContent... contents)
Concatenate the contents of multiple
SanitizedContent objects of kind HTML. |
static SanitizedContent |
SanitizedContents.emptyString(SanitizedContent.ContentKind kind)
Creates an empty string constant.
|
static SanitizedContent |
LazySanitizedContents.forThunk(RenderableThunk value,
SanitizedContent.ContentKind kind)
Creates a SanitizedContent that wraps the given thunk.
|
static SanitizedContent |
SanitizedContents.fromResource(Class<?> contextClass,
String resourceName,
Charset charset,
SanitizedContent.ContentKind kind)
Loads assumed-safe content from a Java resource.
|
static SanitizedContent |
SanitizedContents.fromResource(String resourceName,
Charset charset,
SanitizedContent.ContentKind kind)
Loads assumed-safe content from a Java resource.
|
static SanitizedContent |
UnsafeSanitizedContentOrdainer.ordainAsSafe(String value,
SanitizedContent.ContentKind kind)
Faithfully assumes the provided value is "safe" and marks it not to be re-escaped.
|
static SanitizedContent |
UnsafeSanitizedContentOrdainer.ordainAsSafe(String value,
SanitizedContent.ContentKind kind,
Dir dir)
Faithfully assumes the provided value is "safe" and marks it not to be re-escaped.
|
static SanitizedContent |
SanitizedContents.unsanitizedText(String text)
Creates a SanitizedContent object of kind TEXT and unknown direction.
|
static SanitizedContent |
SanitizedContents.unsanitizedText(String text,
Dir dir)
Creates a SanitizedContent object of kind TEXT of a given direction (null if unknown).
|
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContent |
SanitizedContents.concatHtml(SanitizedContent... contents)
Concatenate the contents of multiple
SanitizedContent objects of kind HTML. |
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContent |
Sanitizers.cleanHtml(SoyValue value)
Normalizes the input HTML while preserving "safe" tags and the known directionality.
|
static SanitizedContent |
Sanitizers.cleanHtml(SoyValue value,
Collection<? extends TagWhitelist.OptionalSafeTag> optionalSafeTags)
Normalizes the input HTML while preserving "safe" tags and the known directionality.
|
static SanitizedContent |
Sanitizers.cleanHtml(String value)
Normalizes the input HTML while preserving "safe" tags.
|
static SanitizedContent |
Sanitizers.cleanHtml(String value,
Collection<? extends TagWhitelist.OptionalSafeTag> optionalSafeTags)
Normalizes the input HTML while preserving "safe" tags.
|
static SanitizedContent |
Sanitizers.cleanHtml(String value,
Dir contentDir,
Collection<? extends TagWhitelist.OptionalSafeTag> optionalSafeTags)
Normalizes the input HTML of a given directionality while preserving "safe" tags.
|
static SanitizedContent |
Sanitizers.filterImageDataUri(SoyValue value)
Makes sure that the given input is a data URI corresponding to an image.
|
static SanitizedContent |
Sanitizers.filterImageDataUri(String value)
Makes sure that the given input is a data URI corresponding to an image.
|
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent |
SoyTofu.Renderer.renderStrict()
Renders the strict-mode template as a SanitizedContent object, which can be used as an input
to another Soy template, or used to verify that the output type is correct.
|