Opened 17 years ago

Closed 17 years ago

#3574 closed (duplicate)

{% url path.to.view %} doesn't un-escape

Reported by: yary h <nospam@…> 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)

URL_test.patch (1.6 KB ) - added by yary h <nospam@…> 17 years ago.
Addition to URL regression test, showing bug/expected behavior

Download all attachments as: .zip

Change History (4)

by yary h <nospam@…>, 17 years ago

Attachment: URL_test.patch added

Addition to URL regression test, showing bug/expected behavior

comment:1 by yary h <nospam@…>, 17 years ago

Cc: not.com@… added

comment:2 by Simon G. <dev@…>, 17 years ago

Component: UncategorizedTemplate system
Owner: changed from Jacob to Adrian Holovaty
Triage Stage: UnreviewedAccepted

comment:3 by Chris Beaven, 17 years ago

Resolution: duplicate
Status: newclosed

Marking as a dupe of #2977

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