Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Turn on autoescaping in jinja templates #9

Open
chrisbay opened this issue Feb 17, 2017 · 0 comments
Open

Turn on autoescaping in jinja templates #9

chrisbay opened this issue Feb 17, 2017 · 0 comments
Assignees

Comments

@chrisbay
Copy link

turning jinja2's autoescape mode on would solve a common problem. Many people were doing something like <p>{{movie.owner}} watched ...</p>. Because movie.owner is an instance of User, it prints out something like <User .. >.

The browser parses that as an html entity, so it doesn't display anything (unless you click view-source). It would be much easier for students to see what was going on if it printed out <User ..>. Plus, it's good practice to have autoescape on anyway.

@chrisbay chrisbay self-assigned this Feb 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant