X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/fa657e16956d77027de1594980e27ffef3ff82c1..183aa1f98a61acb441e082951ff8c24c93cfcc27:/forum/forms/general.py diff --git a/forum/forms/general.py b/forum/forms/general.py index 01c528b..06ee23c 100644 --- a/forum/forms/general.py +++ b/forum/forms/general.py @@ -3,7 +3,6 @@ import re 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 @@ -13,7 +12,9 @@ DEFAULT_NEXT = getattr(settings, 'APP_BASE_URL') 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