Fixed comma detection in break_long_headers templatetag

This commit is contained in:
glic3rinu 2013-04-04 14:01:47 +02:00
parent 92b5db5939
commit b6c7730d7f

View File

@ -268,6 +268,6 @@ def break_long_headers(header):
Breaks headers longer than 160 characters (~page length)
when possible (are comma separated)
"""
if len(header) > 160:
if len(header) > 160 and ',' in header:
header = mark_safe('<br> ' + ', <br>'.join(header.split(',')))
return header