from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from forum import settings
-from django.http import str_to_unicode
from forum.models import User
from forum.modules import call_all_handlers
import urllib
def clean_next(next):
if next is None:
return DEFAULT_NEXT
- next = str_to_unicode(urllib.unquote(next), 'utf-8')
+ next = urllib.unquote(next)
+ if not isinstance(next, unicode):
+ next = unicode(next, 'utf-8')
next = next.strip()
if next.startswith('/'):
return next