# HG changeset patch # User Mads Kiilerich # Date 1573323221 -3600 # 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 -r eee49a119592 -r e2b9731cb2fb kallithea/lib/indexers/__init__.py --- a/kallithea/lib/indexers/__init__.py Mon Nov 04 08:00:01 2019 +0100 +++ b/kallithea/lib/indexers/__init__.py Sat Nov 09 19:13:41 2019 +0100 @@ -203,8 +203,7 @@ 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): """