diff --git a/apps/common/templates/generic_list_subtemplate.html b/apps/common/templates/generic_list_subtemplate.html index 517a813845..47fc6dbb3f 100644 --- a/apps/common/templates/generic_list_subtemplate.html +++ b/apps/common/templates/generic_list_subtemplate.html @@ -2,6 +2,7 @@ {% load attribute_tags %} {% load pagination_tags %} {% load navigation %} +{% load non_breakable %} {% if side_bar %}
@@ -60,7 +61,13 @@ {% endfor %} {% endif %} {% for column in extra_columns %} - {{ object|object_property:column.attribute|safe }} + {% if column.keep_together %} +
+ {{ object|object_property:column.attribute|safe|make_non_breakable }} +
+ {% else %} + {{ object|object_property:column.attribute|safe }} + {% endif %} {% endfor %} {% if not hide_links %} diff --git a/apps/common/templatetags/non_breakable.py b/apps/common/templatetags/non_breakable.py new file mode 100644 index 0000000000..483c899154 --- /dev/null +++ b/apps/common/templatetags/non_breakable.py @@ -0,0 +1,8 @@ +from django.template import Library + +register = Library() + +@register.filter +def make_non_breakable(value): + return value.replace(u'-', u'\u2011') +