diff options
Diffstat (limited to 'horizon/utils/functions.py')
-rw-r--r-- | horizon/utils/functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/horizon/utils/functions.py b/horizon/utils/functions.py index 1052c8ff8..d454156af 100644 --- a/horizon/utils/functions.py +++ b/horizon/utils/functions.py @@ -43,7 +43,7 @@ def add_logout_reason(request, response, reason, status='success'): # Store the translated string in the cookie lang = translation.get_language_from_request(request) with translation.override(lang): - reason = str(reason) + reason = force_text(reason).encode('unicode_escape').decode('ascii') response.set_cookie('logout_reason', reason, max_age=10) response.set_cookie('logout_status', status, max_age=10) |