#25031: unordered_list template filter fails for certain sequences
------------------------------+--------------------------------------------
Reporter: noamkush | Owner: nobody
Type: Bug | Status: new
Component: Template | Version: 1.8
system |
Severity: Normal | Keywords: unordered_list template filter
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------------
unordered_list consumes it's input by pairs. When given a sequence that
contains at an even position two strings and then a list (such as {{{['a',
'a', ['b']]}}}), it will consume both strings and treat the list as an
item on it's own, and not as a sublist of the second string.
The result:
{{{
>>> from django.template import defaultfilters
>>> print str(defaultfilters.unordered_list(['a', 'a', ['b']]))
<li>a</li>
<li>a</li>
<li>['b']</li>
}}}
See pull request with a test and a fix:
https://github.com/django/django/pull/4917
--
Ticket URL: <https://code.djangoproject.com/ticket/25031>
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/051.4a8bc2bcae0dca7bdd032974e2df58ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.