Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7345 closed (fixed)

URLField should append / if no path is specified.

Reported by: Joel Watts Owned by: Malcolm Tredinnick
Component: Forms Version: master
Severity: Keywords: newforms urlfield
Cc: joel@…, Florian Apolloner Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The equivalent URLs http://example.com and http://example.com/ are not being normalized to the same value by URLField.

Attachments (1)

urlfield.diff (3.8 KB) - added by Joel Watts 8 years ago.
Patch to normalize path to / if none is specified (includes tests).

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by Joel Watts

Attachment: urlfield.diff added

Patch to normalize path to / if none is specified (includes tests).

comment:1 Changed 8 years ago by Simon Greenhill

milestone: 1.0 beta
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [8089]) Fixed #7345 -- When normalising the URLField form field, attach a trailing
slash when only a host (no path) is given. Thanks, jpwatts.

comment:3 Changed 8 years ago by Honza Král

Resolution: fixed
Status: closedreopened

urlparse.urlsplit(value) returns a tuple in python 2.4 urlparse.urlsplit(value)[2] works as supposed to.

I have no access to test on other versions.

comment:4 Changed 8 years ago by Malcolm Tredinnick

Owner: changed from nobody to Malcolm Tredinnick
Status: reopenednew
Triage Stage: Ready for checkinAccepted

comment:5 Changed 8 years ago by anonymous

Cc: Florian Apolloner added

comment:6 Changed 8 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [8093]) Fixed #7345 -- In [8089], I'd forgotten that urlparse.urlsplit() didn't return
something with attributes until Python 2.5. Thanks, Honza Kral and apollo13.

comment:7 Changed 5 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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