# HG changeset patch # User Mads Kiilerich # Date 2019-11-09 19:13:41 # Node ID e2b9731cb2fb1e692709ef93ccbc6d26cd38f04c # Parent eee49a11959255823bf0a60b90544400265b93ba search: fix "'' is not unicode" when searching for wildcards Seen when search matches on an empty list of unicode matches and the joining '' thus isn't coerced to u'' - seen for example on http://localhost:5000/_admin/search?q=*a*&type=content . diff --git a/kallithea/lib/indexers/__init__.py b/kallithea/lib/indexers/__init__.py --- a/kallithea/lib/indexers/__init__.py +++ b/kallithea/lib/indexers/__init__.py @@ -203,8 +203,7 @@ class WhooshResultWrapper(object): return res def get_short_content(self, res, chunks): - - return ''.join([res['content'][chunk[0]:chunk[1]] for chunk in chunks]) + return u''.join([res['content'][chunk[0]:chunk[1]] for chunk in chunks]) def get_chunks(self): """