Fix #835238 (Private bug)

This commit is contained in:
Kovid Goyal 2011-08-29 20:12:07 -06:00
parent 29665d415e
commit 1fb22c69af

View File

@ -498,7 +498,8 @@ class BrowseServer(object):
xml(s, True), xml(s, True),
xml(_('Loading, please wait'))+'…', xml(_('Loading, please wait'))+'…',
unicode(c), unicode(c),
xml(u'/browse/category_group/%s/%s'%(category, s), True), xml(u'/browse/category_group/%s/%s'%(category,
hexlify(s.encode('utf-8'))), True),
self.opts.url_prefix) self.opts.url_prefix)
for s, c in category_groups.items()] for s, c in category_groups.items()]
items = '\n\n'.join(items) items = '\n\n'.join(items)
@ -538,7 +539,11 @@ class BrowseServer(object):
category_meta = self.db.field_metadata category_meta = self.db.field_metadata
datatype = category_meta[category]['datatype'] datatype = category_meta[category]['datatype']
if not group: try:
group = unhexlify(group)
if isbytestring(group):
group = group.decode('utf-8')
except:
raise cherrypy.HTTPError(404, 'invalid group') raise cherrypy.HTTPError(404, 'invalid group')
items = categories[category] items = categories[category]