From b6c7730d7f31e84b5f120071ddf9c7ab08e4e7da Mon Sep 17 00:00:00 2001
From: glic3rinu
Date: Thu, 4 Apr 2013 14:01:47 +0200
Subject: Fixed comma detection in break_long_headers templatetag
---
rest_framework/templatetags/rest_framework.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'rest_framework')
diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py
index 189e82f6..c86b6456 100644
--- a/rest_framework/templatetags/rest_framework.py
+++ b/rest_framework/templatetags/rest_framework.py
@@ -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('
' + ',
'.join(header.split(',')))
return header
--
cgit v1.2.3