Opened 18 years ago
Closed 17 years ago
#3574 closed (duplicate)
{% url path.to.view %} doesn't un-escape
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | url | |
Cc: | not.com@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have a view which can return a report as html, a "word" doc, or postscript. The url pattern looks like
(r'^rep/(?P<report_id>\d+)\.(?P<format>html|doc|ps)$','gen'))
Note the escaped period- it needs to match a literal "dot".
the {% url %} template tag then generates a URL that includes the backslash, like /rep/152\.html
. That doesn't actually match the pattern!
Attachments (1)
Change History (4)
by , 18 years ago
Attachment: | URL_test.patch added |
---|
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
Component: | Uncategorized → Template system |
---|---|
Owner: | changed from | to
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
Addition to URL regression test, showing bug/expected behavior