changeset 829:c1000ea40e6c

server (blog): fixed unicode handling for query args
author Goffi <goffi@goffi.org>
date Sat, 09 Jan 2016 12:59:07 +0100
parents 0c824ebe9d87
children a825700c01e4
files src/server/blog.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/server/blog.py	Fri Jan 08 19:58:08 2016 +0100
+++ b/src/server/blog.py	Sat Jan 09 12:59:07 2016 +0100
@@ -242,10 +242,10 @@
             request.extra_dict['rsm_index'] = request.args['index'][0]
         except (ValueError, KeyError):
             try:
-                request.extra_dict['rsm_before'] = request.args['before'][0]
+                request.extra_dict['rsm_before'] = request.args['before'][0].decode('utf-8')
             except KeyError:
                 try:
-                    request.extra_dict['rsm_after'] = request.args['after'][0]
+                    request.extra_dict['rsm_after'] = request.args['after'][0].decode('utf-8')
                 except KeyError:
                     pass
 
@@ -280,7 +280,7 @@
         #      for navigation links.
         request.mam_extra = {}
         try:
-            request.mam_extra['mam_filter_{}'.format(C.MAM_FILTER_CATEGORY)] = request.args['tag'][0]
+            request.mam_extra['mam_filter_{}'.format(C.MAM_FILTER_CATEGORY)] = request.args['tag'][0].decode('utf-8')
         except KeyError:
             pass