Opened 14 years ago

Last modified 14 years ago

#14818 closed

cycle tag is not safe — at Initial Version

Reported by: Stephen Kelly Owned by: nobody
Component: Template system Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In [1]: from django.template import Template, Context
In [3]: t = Template("{% cycle one two as foo %} {% cycle foo %}")
In [5]: c = Context({"one" : "A & B", "two": "C & D"})
In [6]: t.render(c)
Out[6]: u'A & B C & D'

This is likely fixed by using _render_value_in_context() in the implementation of the cycle node render method.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top