AutoEscapeOptions autoEscapeOptions = new AutoEscapeOptions();
autoEscapeOptions.setPropagateEscapeStatus(options.getPropagateEscapeStatus());
autoEscapeOptions.setLogEscapedVariables(options.getLogEscapedVariables());
if (options.getCompileTemplates()) {
// Compiled templates.
TemplateCompiler compiler =
new TemplateCompiler(templateFactory, globalFunctions, autoEscapeOptions);
delegatingTemplateLoaders.add(compiler);
templateLoader = compiler;
} else {
// Walk parse tree every time.
InterpretedTemplateLoader interpreter =