src/cm/views/export.py
changeset 57 b32aa76ee411
parent 56 bd8a4ffc7dad
parent 52 9fa013909d9a
child 77 fe91eb717a96
--- a/src/cm/views/export.py	Fri Dec 11 11:17:01 2009 +0100
+++ b/src/cm/views/export.py	Fri Dec 11 11:48:10 2009 +0100
@@ -102,7 +102,9 @@
     file_title = title + '.' + extension
     from email.header import Header
     encoded_name = str(Header(file_title.encode('utf8'), charset='utf8', maxlinelen=500))
-    response['Content-Disposition'] = u'attachment; filename=%s' % encoded_name
+    # TODO: find a way to include long (more than 76 chars) into header
+    encoded_name = encoded_name.replace('\n','')
+    response['Content-Disposition'] = 'attachment; filename=%s' % encoded_name
     response.write(content)
     return response