Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable-jinja2-autoescape should not change if autoescape=select_autoescape() #284

Closed
clavedeluna opened this issue Feb 19, 2024 · 0 comments · Fixed by #285
Closed

enable-jinja2-autoescape should not change if autoescape=select_autoescape() #284

clavedeluna opened this issue Feb 19, 2024 · 0 comments · Fixed by #285
Assignees

Comments

@clavedeluna
Copy link
Contributor

clavedeluna commented Feb 19, 2024

When investigating the jinja2 autoescape enabled codemod, we discovered some confusion around jinja2 docs and code. We opened a bug report for them pallets/jinja#1890

However, we don't have to wait until that is resolved. We should still not make this change

-env = Environment(autoescape=select_autoescape())
+env = Environment(autoescape=True)

We should at the very least fix this particular case, and if possible, fix any autoescape=callable_that_returns_True()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant