Commit 3dd18326 authored by fred's avatar fred

fix links to tags with spaces

parent 0c7edc0e
......@@ -328,3 +328,7 @@ def get_focus_url(object):
'slug': object.soundfile.episode.slug,
'emission_slug': object.soundfile.episode.emission.slug})
return ''
@register.filter
def facet_tag(tag):
return tag.slug.replace('-', ' ')
......@@ -64,7 +64,7 @@
{% if episode.tags.all %}
<ul class="custom inline">
{% for tag in episode.tags.all %}
<li><a class="tag" href="{% url 'search' %}?&selected_facets=tags_exact:{{tag.slug}}">{{ tag }}</a></li>
<li><a class="tag" href="{% url 'search' %}?&selected_facets=tags_exact:{{tag|facet_tag}}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment