#26478: Template Context should validate names
---------------------------------+--------------------------------------
Reporter: Stephen Kelly | Owner: Tim Martin
Type: New feature | Status: assigned
Component: Template system | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by Tim Martin):
I've created a patch that fixes this by having the `do_for` function
validate the variables against known failure cases. However, this isn't
the most general solution, since there are lots of other cases of invalid
syntax that won't be caught by this. Would it make sense instead to
validate tokens against the requirements for Python identifiers as
described
[https://docs.python.org/3/reference/lexical_analysis.html#identifiers
here]?
--
Ticket URL: <https://code.djangoproject.com/ticket/26478#comment:3>
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/066.6fcc69bb184e7a4c59945799e63e6cde%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.