mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 05:24:00 +03:00
Fixed comma detection in break_long_headers templatetag
This commit is contained in:
parent
92b5db5939
commit
b6c7730d7f
|
@ -268,6 +268,6 @@ def break_long_headers(header):
|
||||||
Breaks headers longer than 160 characters (~page length)
|
Breaks headers longer than 160 characters (~page length)
|
||||||
when possible (are comma separated)
|
when possible (are comma separated)
|
||||||
"""
|
"""
|
||||||
if len(header) > 160:
|
if len(header) > 160 and ',' in header:
|
||||||
header = mark_safe('<br> ' + ', <br>'.join(header.split(',')))
|
header = mark_safe('<br> ' + ', <br>'.join(header.split(',')))
|
||||||
return header
|
return header
|
||||||
|
|
Loading…
Reference in New Issue
Block a user