Opened 9 years ago
Closed 8 years ago
#25031 closed Bug (fixed)
unordered_list template filter fails for certain sequences
Reported by: | Noam | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 1.8 |
Severity: | Release blocker | Keywords: | unordered_list template filter |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (5)
comment:1 by , 9 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please open a new ticket with steps to reproduce the issue, thanks.
Note:
See TracTickets
for help on using tickets.
Regression in b3660d28f3422a33a84de7a7ccad404b3135a1a8