| Package | Description |
|---|---|
| com.google.template.soy.basicdirectives |
Plugin package for basic print directives.
|
| com.google.template.soy.coredirectives |
Plugin package for core print directives.
|
| com.google.template.soy.data |
Java representation of Soy data types.
|
| com.google.template.soy.data.internalutils | |
| com.google.template.soy.incrementaldomsrc | |
| com.google.template.soy.jbcsrc.api | |
| com.google.template.soy.jbcsrc.runtime | |
| com.google.template.soy.jbcsrc.shared | |
| com.google.template.soy.jssrc.restricted | |
| com.google.template.soy.parsepasses.contextautoesc |
A pass that modifies a SoyFile to add escape directives where necessary based on a contextual
examination of template
print commands. |
| com.google.template.soy.pysrc.restricted | |
| com.google.template.soy.shared.internal | |
| com.google.template.soy.soytree |
Soy parse tree.
|
| com.google.template.soy.tofu |
Java Object backend (a.k.a. Tofu).
|
| com.google.template.soy.types.primitive |
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
InsertWordBreaksDirective.getContentKind() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
EscapeHtmlDirective.isNoopForKind(SanitizedContent.ContentKind kind) |
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
SanitizedContentOperator.getContentKind()
The kind of content consumed and produced.
|
SanitizedContent.ContentKind |
SanitizedContent.getContentKind()
Returns the kind of content.
|
static SanitizedContent.ContentKind |
SanitizedContent.ContentKind.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SanitizedContent.ContentKind[] |
SanitizedContent.ContentKind.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContent.ContentKind |
NodeContentKinds.forAttributeValue(String attributeValue)
Given an allowed value of the attribute, returns the corresponding
SanitizedContent.ContentKind). |
| Modifier and Type | Method and Description |
|---|---|
static String |
NodeContentKinds.toAttributeValue(SanitizedContent.ContentKind kind)
Given a ContentKind, returns the attribute string.
|
static String |
NodeContentKinds.toIDOMSanitizedContentCtorName(SanitizedContent.ContentKind contentKind)
Given a
SanitizedContent.ContentKind, returns the corresponding JS SanitizedContent constructor. |
static String |
NodeContentKinds.toJsSanitizedContentCtorName(SanitizedContent.ContentKind contentKind)
Given a
SanitizedContent.ContentKind, returns the corresponding JS SanitizedContent constructor. |
static String |
NodeContentKinds.toJsSanitizedContentOrdainer(SanitizedContent.ContentKind contentKind)
Given a
SanitizedContent.ContentKind, returns the corresponding JS SanitizedContent factory function. |
static String |
NodeContentKinds.toJsSanitizedContentOrdainerForInternalBlocks(SanitizedContent.ContentKind contentKind)
Returns the ordainer function for param and let blocks, which behaves subtly differently than
the normal ordainers to ease migration.
|
static String |
NodeContentKinds.toPySanitizedContentOrdainer(SanitizedContent.ContentKind contentKind)
Given a
SanitizedContent.ContentKind, returns the corresponding Python sanitize class. |
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
IncrementalDomCodeBuilder.getContentKind() |
| Modifier and Type | Method and Description |
|---|---|
void |
IncrementalDomCodeBuilder.setContentKind(SanitizedContent.ContentKind contentKind) |
| Modifier and Type | Method and Description |
|---|---|
SoySauce.Renderer |
SoySauce.Renderer.setExpectedContentKind(SanitizedContent.ContentKind kind)
Sets the expected content kind.
|
| Modifier and Type | Method and Description |
|---|---|
static CompiledTemplate |
Runtime.applyEscapers(CompiledTemplate delegate,
SanitizedContent.ContentKind kind,
List<SoyJavaPrintDirective> directives)
Wraps a given template with a collection of escapers to apply.
|
| Constructor and Description |
|---|
DetachableContentProvider(SanitizedContent.ContentKind contentKind) |
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
CompiledTemplate.kind()
The content kind of the compiled template, used for making runtime content escaping decisions.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<SanitizedContent.ContentKind> |
CompiledTemplates.getTemplateContentKind(String name)
Returns the strict content type of the template.
|
| Modifier and Type | Method and Description |
|---|---|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContent(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null.
|
static JsExpr |
JsExprUtils.maybeWrapAsSanitizedContentForInternalBlocks(SanitizedContent.ContentKind contentKind,
JsExpr jsExpr)
Wraps with the proper SanitizedContent constructor if contentKind is non-null, in a way
specific for let/param blocks.
|
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
Context.getMostAppropriateContentKind()
Returns the most sensible content kind for a context.
|
| Modifier and Type | Method and Description |
|---|---|
String |
Context.getLikelyEndContextMismatchCause(SanitizedContent.ContentKind contentKind)
Returns a plausible human-readable description of a context mismatch;
|
static Context |
Context.getStartContextForContentKind(SanitizedContent.ContentKind contentKind)
Returns the autoescape
Context that produces sanitized content of the given
SanitizedContent.ContentKind. |
boolean |
Context.isValidEndContextForContentKind(SanitizedContent.ContentKind contentKind)
Determines whether a particular context is valid for the end of a block of a particular
content kind.
|
boolean |
Context.isValidStartContextForContentKind(SanitizedContent.ContentKind contentKind)
Determines whether a particular context is valid at the start of a block of a particular
content kind.
|
boolean |
Context.isValidStartContextForContentKindLoose(SanitizedContent.ContentKind contentKind)
Determines whether a particular context is allowed for contextual to strict calls.
|
| Constructor and Description |
|---|
ContextualAutoescaper(Iterable<String> autoescapeCancellingDirectives,
Map<String,SanitizedContent.ContentKind> sanitizedContentOperators) |
| Modifier and Type | Method and Description |
|---|---|
static PyExpr |
PyExprUtils.wrapAsSanitizedContent(SanitizedContent.ContentKind contentKind,
PyExpr pyExpr)
Wraps an expression with the proper SanitizedContent constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ShortCircuitable.isNoopForKind(SanitizedContent.ContentKind kind)
Returns true if this directive will turn into a no-op when passed values of the given content
kind.
|
| Modifier and Type | Field and Description |
|---|---|
SanitizedContent.ContentKind |
EscapingMode.contentKind
The kind of content produced by the escaping directive associated with this escaping mode.
|
| Modifier and Type | Method and Description |
|---|---|
protected SanitizedContent.ContentKind |
TemplateNodeBuilder.getContentKind() |
SanitizedContent.ContentKind |
TemplateNode.getContentKind()
Returns the content kind for strict autoescaping.
|
SanitizedContent.ContentKind |
SoyNode.RenderUnitNode.getContentKind()
Returns the content kind for strict autoescape, or null if not specified or not applicable.
|
SanitizedContent.ContentKind |
LetContentNode.getContentKind() |
SanitizedContent.ContentKind |
CallParamContentNode.getContentKind() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<SanitizedContent.ContentKind> |
TemplateRegistry.getCallContentKind(CallNode node)
Gets the content kind that a call results in.
|
| Modifier and Type | Method and Description |
|---|---|
static LetContentNode |
LetContentNode.forVariable(int id,
SourceLocation sourceLocation,
String varName,
SanitizedContent.ContentKind contentKind)
Creates a LetContentNode for a compiler-generated variable.
|
protected void |
TemplateNodeBuilder.setAutoescapeInfo(AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind) |
TemplateDelegateNodeBuilder |
TemplateDelegateNodeBuilder.setCmdTextInfo(String delTemplateName,
String delTemplateVariant,
TemplateNode.Priority delPriority,
AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind,
com.google.common.collect.ImmutableList<String> requiredCssNamespaces)
Alternative to
setCmdText() that sets command text info directly as opposed to having
it parsed from the command text string. |
TemplateBasicNodeBuilder |
TemplateBasicNodeBuilder.setCmdTextInfo(String templateName,
String partialTemplateName,
Visibility visibility,
AutoescapeMode autoescapeMode,
SanitizedContent.ContentKind contentKind,
com.google.common.collect.ImmutableList<String> requiredCssNamespaces)
Alternative to
setCmdText() that sets command text info directly as opposed to having
it parsed from the command text string. |
| Modifier and Type | Method and Description |
|---|---|
SanitizedContent.ContentKind |
SoyTofu.Renderer.render(Appendable out)
Renders the template using the data, injected data, and message bundle previously set
into the given Appendable.
|
| Modifier and Type | Method and Description |
|---|---|
SoyTofu.Renderer |
SoyTofu.Renderer.setContentKind(SanitizedContent.ContentKind contentKind)
Sets the expected content kind.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SanitizedContent.ContentKind |
SanitizedType.getContentKind()
Returns the content kind for this type.
|
SanitizedContent.ContentKind |
SanitizedType.HtmlType.getContentKind() |
SanitizedContent.ContentKind |
SanitizedType.AttributesType.getContentKind() |
SanitizedContent.ContentKind |
SanitizedType.UriType.getContentKind() |
SanitizedContent.ContentKind |
SanitizedType.TrustedResourceUriType.getContentKind() |
SanitizedContent.ContentKind |
SanitizedType.CssType.getContentKind() |
SanitizedContent.ContentKind |
SanitizedType.JsType.getContentKind() |
| Modifier and Type | Method and Description |
|---|---|
static SoyType |
SanitizedType.getTypeForContentKind(SanitizedContent.ContentKind contentKind)
Given a content kind, return the corresponding soy type.
|