| Package | Description |
|---|---|
| com.google.template.soy.base.internal | |
| com.google.template.soy.data.internalutils | |
| com.google.template.soy.jbcsrc.restricted | |
| com.google.template.soy.jssrc.internal | |
| 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.soytree |
Soy parse tree.
|
| com.google.template.soy.types |
Classes that represent Soy parameter type declarations.
|
| Modifier and Type | Method and Description |
|---|---|
static SanitizedContentKind |
SanitizedContentKind.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SanitizedContentKind[] |
SanitizedContentKind.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.base.Optional<SanitizedContentKind> |
SanitizedContentKind.fromAttributeValue(String attributeValue)
Returns the kind for the given attribute value.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
NodeContentKinds.getJsImportForOrdainersFunctions(SanitizedContentKind contentKind)
Returns the namespace to
goog.require to access the ordainer functions provided by
NodeContentKinds.toJsSanitizedContentOrdainer(SanitizedContentKind) and NodeContentKinds.toJsSanitizedContentOrdainerForInternalBlocks(SanitizedContentKind). |
static String |
NodeContentKinds.toIDOMSanitizedContentCtorName(SanitizedContentKind contentKind)
Given a
SanitizedContentKind, returns the corresponding JS SanitizedContent
constructor. |
static String |
NodeContentKinds.toJsSanitizedContentCtorName(SanitizedContentKind contentKind)
Given a
SanitizedContentKind, returns the corresponding JS SanitizedContent
constructor. |
static String |
NodeContentKinds.toJsSanitizedContentOrdainer(SanitizedContentKind contentKind)
Given a
SanitizedContentKind, returns the corresponding JS SanitizedContent factory
function. |
static String |
NodeContentKinds.toJsSanitizedContentOrdainerForInternalBlocks(SanitizedContentKind 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(SanitizedContentKind contentKind)
Given a
SanitizedContentKind, returns the corresponding Python sanitize class. |
| Modifier and Type | Method and Description |
|---|---|
static Expression |
BytecodeUtils.constantSanitizedContentKindAsContentKind(SanitizedContentKind kind)
Returns an
Expression that evaluates to the SanitizedContent.ContentKind value that is
equivalent to the given SanitizedContentKind, or null. |
static SoyExpression |
SoyExpression.forSanitizedString(Expression delegate,
SanitizedContentKind kind) |
| Modifier and Type | Method and Description |
|---|---|
protected CodeChunk.WithValue |
GenJsCodeVisitor.sanitize(CodeChunk.WithValue templateBody,
SanitizedContentKind contentKind) |
static CodeChunk.WithValue |
JsRuntime.sanitizedContentOrdainerFunction(SanitizedContentKind kind)
Returns an 'ordainer' function that can be used wrap a
string in a SanitizedContent object with no escaping. |
static CodeChunk.WithValue |
JsRuntime.sanitizedContentOrdainerFunctionForInternalBlocks(SanitizedContentKind kind)
Returns an 'ordainer' function that can be used wrap a
string in a SanitizedContent object with no escaping. |
static CodeChunk.WithValue |
JsRuntime.sanitizedContentType(SanitizedContentKind kind)
Returns the js type for the sanitized content object corresponding to the given ContentKind.
|
| Modifier and Type | Method and Description |
|---|---|
SanitizedContentKind |
Context.getMostAppropriateContentKind()
Returns the most sensible content kind for a context.
|
| Modifier and Type | Method and Description |
|---|---|
String |
Context.getLikelyEndContextMismatchCause(SanitizedContentKind contentKind)
Returns a plausible human-readable description of a context mismatch;
|
static Context |
Context.getStartContextForContentKind(SanitizedContentKind contentKind)
Returns the autoescape
Context that produces sanitized content of the given SanitizedContentKind. |
boolean |
Context.isValidEndContextForContentKind(SanitizedContentKind contentKind)
Determines whether a particular context is valid for the end of a block of a particular content
kind.
|
boolean |
Context.isValidStartContextForContentKind(SanitizedContentKind contentKind)
Determines whether a particular context is valid at the start of a block of a particular
content kind.
|
boolean |
Context.isValidStartContextForContentKindLoose(SanitizedContentKind contentKind)
Determines whether a particular context is allowed for contextual to strict calls.
|
| Modifier and Type | Field and Description |
|---|---|
SanitizedContentKind |
EscapingMode.contentKind
The kind of content produced by the escaping directive associated with this escaping mode.
|
| Modifier and Type | Method and Description |
|---|---|
SanitizedContentKind |
TemplateNodeBuilder.getContentKind() |
SanitizedContentKind |
SoyNode.RenderUnitNode.getContentKind()
Returns the content kind for strict autoescape, or null if not specified or not applicable.
|
SanitizedContentKind |
CallParamContentNode.getContentKind() |
SanitizedContentKind |
LetContentNode.getContentKind() |
SanitizedContentKind |
TemplateNode.getContentKind()
Returns the content kind for strict autoescaping.
|
SanitizedContentKind |
CommandTagAttribute.valueAsContentKind(ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<SanitizedContentKind> |
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,
SanitizedContentKind contentKind)
Creates a LetContentNode for a compiler-generated variable.
|
protected void |
TemplateNodeBuilder.setAutoescapeInfo(AutoescapeMode autoescapeMode,
SanitizedContentKind contentKind,
SourceLocation kindLocation) |
TemplateDelegateNodeBuilder |
TemplateDelegateNodeBuilder.setCmdTextInfo(String delTemplateName,
String delTemplateVariant,
TemplateNode.Priority delPriority,
AutoescapeMode autoescapeMode,
SanitizedContentKind 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,
SanitizedContentKind 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 |
|---|---|
abstract SanitizedContentKind |
SanitizedType.getContentKind()
Returns the content kind for this type.
|
SanitizedContentKind |
SanitizedType.HtmlType.getContentKind() |
SanitizedContentKind |
SanitizedType.AttributesType.getContentKind() |
SanitizedContentKind |
SanitizedType.UriType.getContentKind() |
SanitizedContentKind |
SanitizedType.TrustedResourceUriType.getContentKind() |
SanitizedContentKind |
SanitizedType.CssType.getContentKind() |
SanitizedContentKind |
SanitizedType.JsType.getContentKind() |
| Modifier and Type | Method and Description |
|---|---|
static SoyType |
SanitizedType.getTypeForContentKind(SanitizedContentKind contentKind)
Given a content kind, return the corresponding soy type.
|