#5045: Primary keys containing URL characters breaks admin links
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Admin interface
Version: SVN | Keywords: unicode
Stage: Unreviewed | Has_patch: 1
------------------------------+---------------------------------------------
The {{{ quote }}} function, used by the admin application to escape url
characters, incorrectly checks for strings:
{{{
if type(s) != type(''):
return s
}}}
This obviously fails now that Django can return a unicode string for field
values, resulting in broken links for objects with url characters in their
primary key.
Checking against basestring would seem to be one way to go:
{{{
if not isinstance(s, basestring):
return s
}}}
...but perhaps the admin application should be changed to use {{{
django.utils.http.urlquote }}} since this performs a similar function?
--
Ticket URL: <http://code.djangoproject.com/ticket/5045>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---