Code

Opened 7 years ago

Closed 7 years ago

#4075 closed (fixed)

The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.

Reported by: justin.vanwinkle@… Owned by: adrian
Component: Template system Version: master
Severity: Keywords: url question-mark regex template
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by mtredinnick)

The template tag

{% url example_edit %}

produces

http://localhost:8000/wiki/example/add/?

for the urls.py entry

url(r'^wiki/example/add/?$', example_edit, name="example_edit")

it should produce

http://localhost:8000/wiki/example/add/

since the '?' is a regex operator in this context.

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

I'm pretty sure this is actually a problem with the current core.urlresolvers.reverse - see #2977

comment:2 Changed 7 years ago by mtredinnick

  • Description modified (diff)

Fixed summary formatting.

comment:3 Changed 7 years ago by SmileyChris

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

I'll mark as a dupe, #2977 addresses this.

comment:4 Changed 7 years ago by Rafael

  • Cc Excellent, web, site, I, will, be, visiting, ofteno added
  • Component changed from Template system to Cache system
  • Keywords %0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AExcellent+web+site+I+will+be+visiting+ofteno added; url question-mark regex template removed
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls. to %250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2Bofteno
  • Triage Stage changed from Accepted to Design decision needed
  • Version changed from SVN to unicode

%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250A%25250D%25250AExcellent%252Bweb%252Bsite%252BI%252Bwill%252Bbe%252Bvisiting%252Bofteno

comment:5 Changed 7 years ago by russellm

  • Cc Excellent, web, site, I, will, be, visiting, ofteno removed
  • Component changed from Cache system to Template system
  • Keywords url question-mark regex template added; %0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AExcellent+web+site+I+will+be+visiting+ofteno removed
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Summary changed from %250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2Bofteno to The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.
  • Triage Stage changed from Design decision needed to Accepted
  • Version changed from unicode to SVN

Reverted blog spam

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.