#12072 closed (fixed)
Literal strings containing [,=] break {% url %}.
Reported by: | Johannes Dollinger | Owned by: | alexdutton |
---|---|---|---|
Component: | Template system | Version: | 1.1 |
Severity: | Keywords: | url tag | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
>>> Template('{% url view arg|join:"," %}') ... TemplateSyntaxError: join requires 1 arguments, 0 provided >>> Template('{% url view "==" %}') ... TemplateSyntaxError: Could not parse the remainder: '="' from '="'
Attachments (4)
Change History (13)
comment:1 by , 15 years ago
Component: | Uncategorized → Template system |
---|---|
Keywords: | url tag added |
comment:2 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:5 by , 15 years ago
Owner: | changed from | to
---|
by , 15 years ago
Attachment: | patch-12072.diff added |
---|
comment:6 by , 15 years ago
I've added some tests to highlight the issue, and also replaced the {% url %} argument parsing.
Previously it split on ',' and '=' regardless of whether they're in string literals.
Now using filter_re from django.template to cope with string literals.
comment:8 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch (maybe not pretty)