|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.template.soy.tofu.restricted.SoyAbstractTofuPrintDirective
com.google.template.soy.coredirectives.EscapeHtmlDirective
public class EscapeHtmlDirective
A directive that HTML-escapes the output.
| Field Summary | |
|---|---|
static String |
NAME
|
| Constructor Summary | |
|---|---|
EscapeHtmlDirective()
|
|
| Method Summary | |
|---|---|
SoyData |
apply(SoyData value,
List<SoyData> args)
Applies this directive on the given value. |
JavaExpr |
applyForJavaSrc(JavaExpr value,
List<JavaExpr> args)
Applies this directive on the given string value. |
JsExpr |
applyForJsSrc(JsExpr value,
List<JsExpr> args)
Applies this directive on the given string value. |
String |
getName()
Gets the name of the Soy print directive. |
Set<Integer> |
getValidArgsSizes()
Gets the set of valid args list sizes. |
boolean |
shouldCancelAutoescape()
Returns whether the appearance of this directive on a 'print' tag should cancel autoescape for that 'print' tag. |
| Methods inherited from class com.google.template.soy.tofu.restricted.SoyAbstractTofuPrintDirective |
|---|
applyForTofu |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
@Inject public EscapeHtmlDirective()
| Method Detail |
|---|
public String getName()
SoyPrintDirective
getName in interface SoyPrintDirectivepublic Set<Integer> getValidArgsSizes()
SoyPrintDirective
getValidArgsSizes in interface SoyPrintDirectivepublic boolean shouldCancelAutoescape()
SoyPrintDirective
shouldCancelAutoescape in interface SoyPrintDirective
public SoyData apply(SoyData value,
List<SoyData> args)
SoyJavaRuntimePrintDirective
apply in interface SoyJavaRuntimePrintDirectivevalue - The input to the directive. This may have not yet been coerced to a string.args - The directive's arguments, if any (usually none).
public JsExpr applyForJsSrc(JsExpr value,
List<JsExpr> args)
SoyJsSrcPrintDirective Important note when implementing this method: The string value may not yet have been
coerced to a string. You may need to explicitly coerce it to a string using the JS function
String().
applyForJsSrc in interface SoyJsSrcPrintDirectivevalue - The value to apply the directive on. This value may not yet have been
coerced to a string.args - The directive's arguments, if any (usually none).
public JavaExpr applyForJavaSrc(JavaExpr value,
List<JavaExpr> args)
SoyJavaSrcPrintDirective
applyForJavaSrc in interface SoyJavaSrcPrintDirectivevalue - The value to apply the directive on. This value may not yet have been
coerced to a string.args - The directive's arguments, if any (usually none).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||