Andrei Kavaleu  committed 1363e3e

tweaks to work with django 1.5: unicode() changed to iri_to_uri() as more appropriate

  • Participants
  • Parent commits 539b0a1

Comments (0)

Files changed (1)

File django_authopenid/utils/

 import urllib
 from django.conf import settings
+from django.utils.encoding import iri_to_uri
 from django.utils.html import escape
 def clean_next(next):
     if next is None:
         return DEFAULT_NEXT
-    next = unicode(urllib.unquote(next), 'utf-8')
+    next = iri_to_uri(urllib.unquote(next))
     next = next.strip()
     if next.startswith('/'):
         return next