public class Configuration
extends java.lang.Object
Configuration is used to configure various aspects of the carrot engine.| Modifier and Type | Class and Description |
|---|---|
static interface |
Configuration.Logger |
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAutoEscape() |
java.lang.String |
getEncoding() |
Configuration.Logger |
getLogger() |
ResourceLocater |
getResourceLocater() |
TagRegistry |
getTagRegistry() |
void |
setAutoEscape(boolean value)
Sets whether or not you want to automatically escape all variable output.
|
Configuration |
setEncoding(java.lang.String encoding) |
Configuration |
setLogger(Configuration.Logger logger) |
Configuration |
setResourceLocater(ResourceLocater resourceLocater) |
public java.lang.String getEncoding()
public Configuration setEncoding(java.lang.String encoding)
public ResourceLocater getResourceLocater()
public Configuration setResourceLocater(ResourceLocater resourceLocater)
public TagRegistry getTagRegistry()
public boolean getAutoEscape()
public void setAutoEscape(boolean value)
By default, all variables are HTML-escaped. You can explicitly mark output as "safe" for output by passing it through html.safe(), as in:
{{ html.safe("Some <b>HTML</b> here") }}
Without the call to html.safe, the above would have output
"Some <b>HTML</b> here".value - If true, output will be automatically HTML-escaped. If false, it would be as if all output is wrapped
in html.safe() by default.public Configuration setLogger(Configuration.Logger logger)
public Configuration.Logger getLogger()