Re: Should jinja2 run with autoescape set to true?

Christof Meerwald <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Mon, Jan 13, 2020 at 01:38:38PM +0100, Ralf Schlatterbeck wrote:
> I'm not familiar how jinja handles i18n, if this is done with an
> explicit call to some gettext expression, this should probably be
> factored into its own template that then turns of autoescape once.

So the current jinja2 template doesn't use the jinja2 i18n extension
to handle translations, but instead calls into python to do the
translation.

Moving the translation stuff to use the jinja2 i18n extension and then
enabling autoescape would look like this:
https://bitbucket.org/cmeerw/roundup/commits/915f4f12fa8fbbab33f06291e9c5d7ac39d2d277?at=jinja2-autoescape

Do we want to apply that change?


Christof

-- 

http://cmeerw.org                              sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.