Skip to content

Commit b6c7730

Browse files
author
glic3rinu
committed
Fixed comma detection in break_long_headers templatetag
1 parent 92b5db5 commit b6c7730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/templatetags/rest_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,6 @@ def break_long_headers(header):
268268
Breaks headers longer than 160 characters (~page length)
269269
when possible (are comma separated)
270270
"""
271-
if len(header) > 160:
271+
if len(header) > 160 and ',' in header:
272272
header = mark_safe('<br> ' + ', <br>'.join(header.split(',')))
273273
return header

0 commit comments

Comments
 (0)