Commits

Andrei Kavaleu committed 1363e3e

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

Comments (0)

Files changed (1)

django_authopenid/utils/__init__.py

 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