Opened 16 years ago
Closed 16 years ago
#11456 closed (duplicate)
flatpages append slash not working with unicode urls
| Reported by: | hadaraz | Owned by: | nobody |
|---|---|---|---|
| Component: | Contrib apps | Version: | 1.1-beta |
| Severity: | Keywords: | flatpages | |
| Cc: | yoan@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The append slash is currently:
if not url.endswith('/') and settings.APPEND_SLASH:
return HttpResponseRedirect("%s/" % request.path)
It works fine for non-unicode urls. However, when using another regex for the url field which allows unicode chars in it, request.path needs to be quoted for the redirection to work:
if not url.endswith('/') and settings.APPEND_SLASH:
return HttpResponseRedirect("%s/" % iri_to_uri(urlquote(request.path)))
Change History (4)
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
| Cc: | added |
|---|
comment:4 by , 16 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
As noted above, #11522 is the underlying problem that needs to be fixed.
Note:
See TracTickets
for help on using tickets.
If you look into this ticket: #11522 there a more generic way of doing it as it should be handled by
HttpResponseRedirectimho.