Opened 10 years ago

Closed 9 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: master
Severity: Keywords: url
Cc: not.com@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@…> 10 years ago.
Addition to URL regression test, showing bug/expected behavior

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by yary h <nospam@…>

Attachment: URL_test.patch added

Addition to URL regression test, showing bug/expected behavior

comment:1 Changed 10 years ago by yary h <nospam@…>

Cc: not.com@… added

comment:2 Changed 10 years ago by Simon G. <dev@…>

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

comment:3 Changed 9 years ago by Chris Beaven

Resolution: duplicate
Status: newclosed

Marking as a dupe of #2977

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