diff --git a/apps/downloads/templatetags/download_tags.py b/apps/downloads/templatetags/download_tags.py index 45d7c12f5..2074bbccb 100644 --- a/apps/downloads/templatetags/download_tags.py +++ b/apps/downloads/templatetags/download_tags.py @@ -110,8 +110,8 @@ def wbr_wrap(value: str | None) -> str: # Split into two halves, each half has internal breaks midpoint = len(chunks) // 2 - first_half = format_html_join(mark_safe(""), "{}", chunks[:midpoint]) - second_half = format_html_join(mark_safe(""), "{}", chunks[midpoint:]) + first_half = format_html_join(mark_safe(""), "{}", [(chunk,) for chunk in chunks[:midpoint]]) + second_half = format_html_join(mark_safe(""), "{}", [(chunk,) for chunk in chunks[midpoint:]]) return format_html( '{}{}', first_half, second_half