Code

Opened 7 years ago

Closed 7 years ago

#3574 closed (duplicate)

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

Reported by: yary h <nospam@…> Owned by: adrian
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@…> 7 years ago.
Addition to URL regression test, showing bug/expected behavior

Download all attachments as: .zip

Change History (4)

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

Addition to URL regression test, showing bug/expected behavior

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

  • Cc not.com@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

  • Component changed from Uncategorized to Template system
  • Owner changed from jacob to adrian
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 7 years ago by SmileyChris

  • Resolution set to duplicate
  • Status changed from new to closed

Marking as a dupe of #2977

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.