Opened 17 years ago

Closed 17 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 Holovaty
Component: Template system Version: dev
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: no UI/UX: no

Description (last modified by Malcolm Tredinnick)

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.

Change History (5)

comment:1 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedAccepted

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

comment:2 by Malcolm Tredinnick, 17 years ago

Description: modified (diff)

Fixed summary formatting.

comment:3 by Chris Beaven, 17 years ago

Resolution: duplicate
Status: newclosed

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

comment:4 by Rafael, 17 years ago

Cc: Excellent web site I will be visiting ofteno added
Component: Template systemCache 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
Status: closedreopened
Summary: The url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.%250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2Bofteno
Triage Stage: AcceptedDesign decision needed
Version: SVNunicode

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

comment:5 by Russell Keith-Magee, 17 years ago

Cc: Excellent web site I will be visiting ofteno removed
Component: Cache systemTemplate 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: fixed
Status: reopenedclosed
Summary: %250D%250A%250D%250A%250D%250A%250D%250A%250D%250A%250D%250AExcellent%2Bweb%2Bsite%2BI%2Bwill%2Bbe%2Bvisiting%2BoftenoThe url template tag incorrectly includes the '?' character found in a urls.py regex when producing urls.
Triage Stage: Design decision neededAccepted
Version: unicodeSVN

Reverted blog spam

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