On corrige le problèmes des nouvelles lignes dans les noms des fichiers ical
This commit is contained in:
parent
3cf874224f
commit
0542e3a695
@ -809,7 +809,7 @@ def export_event_ical(request, year, month, day, pk):
|
|||||||
response = HttpResponse(content_type="text/calendar")
|
response = HttpResponse(content_type="text/calendar")
|
||||||
response.content = cal.to_ical().decode("utf-8").replace("\r\n", "\n")
|
response.content = cal.to_ical().decode("utf-8").replace("\r\n", "\n")
|
||||||
response["Content-Disposition"] = "attachment; filename={0}{1}".format(
|
response["Content-Disposition"] = "attachment; filename={0}{1}".format(
|
||||||
event.title, ".ics"
|
event.title.replace('\n', ' ').replace('\r', '')[0:32], ".ics"
|
||||||
)
|
)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user