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

turn on autoescape in Jinja2 #9

Closed
chadwhitacre opened this issue Feb 5, 2015 · 4 comments · Fixed by #12
Closed

turn on autoescape in Jinja2 #9

chadwhitacre opened this issue Feb 5, 2015 · 4 comments · Fixed by #12

Comments

@chadwhitacre
Copy link
Contributor

Jinja2 sez autoescape is bad, but I disagree. See gratipay/gratipay.com#722 for discussion.

@pjz
Copy link
Contributor

pjz commented Feb 6, 2015

I'd rather leave it the default, but document how to turn it on if you want it. Could/should also serve to document how, in general, to tweak renderers.

@chadwhitacre
Copy link
Contributor Author

The difference in our case is that we're almost exclusively HTML/XML in context. Jinja2 might be used for email, but aspen-jinja2 is almost certainly being used for HTML.

@Changaco
Copy link
Member

Changaco commented Feb 6, 2015

aspen-jinja2 should be able to determine what it's being used for (via the Content-Type) and thus whether or not it's appropriate to turn on the autoescape.

@Changaco
Copy link
Member

I have a branch ready for this, waiting for the next Aspen release.

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

Successfully merging a pull request may close this issue.

3 participants