Unverified Commit 6d5e0ba6 authored by Mustafa Bal's avatar Mustafa Bal Committed by GitHub
Browse files

Added select_autoescape for jinja2 env (#1428)

parent 69293315
......@@ -15,6 +15,7 @@ https://github.com/pytorch/vision/pull/1321#issuecomment-531033978
"""
import jinja2
from jinja2 import select_autoescape
import yaml
import os.path
......@@ -213,7 +214,7 @@ if __name__ == "__main__":
env = jinja2.Environment(
loader=jinja2.FileSystemLoader(d),
lstrip_blocks=True,
autoescape=False,
autoescape=select_autoescape(enabled_extensions=('html', 'xml')),
)
with open(os.path.join(d, 'config.yml'), 'w') as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment