Merge "Add jinja2 autoescape=True"

This commit is contained in:
Jenkins 2017-04-18 09:38:03 +00:00 committed by Gerrit Code Review
commit d62a65a11c

View File

@ -50,10 +50,12 @@ isotime = timeutils.isotime
def build_jinja_environment(): def build_jinja_environment():
env = jinja2.Environment(loader=jinja2.ChoiceLoader([ env = jinja2.Environment(
jinja2.FileSystemLoader(CONF.template_path), autoescape=True,
jinja2.PackageLoader("trove", "templates") loader=jinja2.ChoiceLoader([
])) jinja2.FileSystemLoader(CONF.template_path),
jinja2.PackageLoader("trove", "templates")
]))
# Add some basic operation not built-in. # Add some basic operation not built-in.
env.globals['max'] = max env.globals['max'] = max
env.globals['min'] = min env.globals['min'] = min