Unverified Commit 88c16391 authored by Mustafa Bal's avatar Mustafa Bal Committed by GitHub
Browse files

Fixed jinja2 environment autoescape to enable select extensions (#3635)


Co-authored-by: default avatarNicolas Hug <nicolashug@fb.com>
parent 9b19f0f1
......@@ -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
......@@ -295,7 +296,7 @@ if __name__ == "__main__":
env = jinja2.Environment(
loader=jinja2.FileSystemLoader(d),
lstrip_blocks=True,
autoescape=False,
autoescape=select_autoescape(enabled_extensions=('html', 'xml')),
keep_trailing_newline=True,
)
......
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