Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
6d5e0ba6
Unverified
Commit
6d5e0ba6
authored
Apr 06, 2021
by
Mustafa Bal
Committed by
GitHub
Apr 06, 2021
Browse files
Added select_autoescape for jinja2 env (#1428)
parent
69293315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
.circleci/regenerate.py
.circleci/regenerate.py
+2
-1
No files found.
.circleci/regenerate.py
View file @
6d5e0ba6
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment