#25469: Autoescape is not possible with Django 1.8 template refactor
---------------------------------+-----------------------
Reporter: aidanlister | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Keywords: templates
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-----------------------
Passing Context(mydata, autoescape=True) is no longer effective when using
the non-deprecated format:
{{{
from django.template import engines
engines['django'].from_string('hello {{person}}').render({'person':
'bob & co'})
>>> 'hello bob & co'
}}}
vs
{{{
from django.template import Template,Context
Template('hello {{person}}').render(Context({'person': 'bob & co'},
autoescape=False))
>>> 'hello bob & co'
}}}
This is a very useful feature when not generated HTML templates!
--
Ticket URL: <https://code.djangoproject.com/ticket/25469>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.c55a91ec03b508f662a9f7381f0d5967%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.