Skip to content

Commit

Permalink
Unicode, unicode everywhere (fix non-ascii facets crashing when searc…
Browse files Browse the repository at this point in the history
…hing)
  • Loading branch information
TkTech committed Sep 29, 2016
1 parent 65a8a95 commit c99a2a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ckan/controllers/package.py
Expand Up @@ -224,8 +224,8 @@ def pager_url(q=None, page=None):
# We're filtering on a list of items, each of which
# should be escaped and OR'd instead of Solr's default
# AND.
filter_value = '({0})'.format(
' OR '.join('"{0}"'.format(
filter_value = u'({0})'.format(
u' OR '.join(u'"{0}"'.format(
v
) for v in value)
)
Expand All @@ -235,12 +235,12 @@ def pager_url(q=None, page=None):
# a range. We assume it's a range if it starts with a
# [, otherwise we escape it and treat it as a literal.
filter_value = (
value if value.startswith('[')
else '"{0}"'.format(value)
value if value.startswith(u'[')
else u'"{0}"'.format(value)
)

# Tag each value with a domain so we can act on it later.
fq_list.append('{{!tag={p}}}{p}:{v}'.format(
fq_list.append(u'{{!tag={p}}}{p}:{v}'.format(
p=param,
v=filter_value
))
Expand Down

0 comments on commit c99a2a4

Please sign in to comment.