Skip to content

Commit

Permalink
Switch tildes to pluses
Browse files Browse the repository at this point in the history
Because `~` creates a convert to unicode:
https://github.com/pallets/jinja/blob/master/jinja2/nodes.py#L757

which upsets url_for: `url_for can only return a string, got unicode instead`
  • Loading branch information
mattfullerton committed Oct 2, 2017
1 parent 98761ec commit aecb1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/templates/package/search.html
Expand Up @@ -4,7 +4,7 @@
{% block subtitle %}{{ _("Datasets") }}{% endblock %}

{% block breadcrumb_content %}
<li class="active">{{ h.nav_link(_(dataset_type.title() ~ 's'), controller='package', action='search', named_route=dataset_type ~ '_search', highlight_actions = 'new index') }}</li>
<li class="active">{{ h.nav_link(_(dataset_type.title() + 's'), controller='package', action='search', named_route=dataset_type + '_search', highlight_actions = 'new index') }}</li>
{% endblock %}

{% block primary_content %}
Expand Down Expand Up @@ -32,7 +32,7 @@
(_('Last Modified'), 'metadata_modified desc'),
(_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ]
%}
{% snippet 'snippets/search_form.html', form_id='dataset-search-form', type=dataset_type, query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search ' ~ dataset_type ~ 's') ~ '...', facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %}
{% snippet 'snippets/search_form.html', form_id='dataset-search-form', type=dataset_type, query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search ' + dataset_type + 's') + '...', facets=facets, show_empty=request.params, error=c.query_error, fields=c.fields %}
{% endblock %}
{% block package_search_results_list %}
{{ h.snippet('snippets/package_list.html', packages=c.page.items) }}
Expand Down

0 comments on commit aecb1f1

Please sign in to comment.