Opened 17 years ago
Closed 14 years ago
#6129 closed (fixed)
"url" template-tag incorrectly encodes tilde (~) character in urls
Reported by: | moe | Owned by: | Pete Crosier |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The "url" template-tag encodes the tilde (~) character in urls
although it is a legal ("unreserved") URL character since
1995, cf. RFC2396.
RFC2396 (1995): http://www.cs.tut.fi/~jkorpela/rfc/2396/full.html
RFC3986 (2005): http://www.rfc-editor.org/rfc/rfc3986.txt
This causes uglyness in the adressbar when a django app
wants to support the common http://server/~username/ URL-style.
Django should stick to the RFC and only encode characters
that must be encoded.
Attachments (1)
Change History (5)
by , 17 years ago
Attachment: | 6129.django.utils.encoding.diff added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I've attached a simple patch.. is it really this simple or am I missing something, would be good to get a professional opinion :D
comment:2 by , 17 years ago
Status: | assigned → new |
---|
comment:3 by , 17 years ago
Keywords: | flapdoodle removed |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
It does look that you're right.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is definitely a safe change to make and was already fixed in r12066 (along with a couple of other characters).
Fix to leave tildes alone