Merge "Add jinja2 autoescape=True"
This commit is contained in:
commit
d62a65a11c
@ -50,10 +50,12 @@ isotime = timeutils.isotime
|
||||
|
||||
|
||||
def build_jinja_environment():
|
||||
env = jinja2.Environment(loader=jinja2.ChoiceLoader([
|
||||
jinja2.FileSystemLoader(CONF.template_path),
|
||||
jinja2.PackageLoader("trove", "templates")
|
||||
]))
|
||||
env = jinja2.Environment(
|
||||
autoescape=True,
|
||||
loader=jinja2.ChoiceLoader([
|
||||
jinja2.FileSystemLoader(CONF.template_path),
|
||||
jinja2.PackageLoader("trove", "templates")
|
||||
]))
|
||||
# Add some basic operation not built-in.
|
||||
env.globals['max'] = max
|
||||
env.globals['min'] = min
|
||||
|
Loading…
Reference in New Issue
Block a user