[FIX] web: attachment with safari

With Safari, the function content_disposition must return "attachment; filename=\"%s\"" % filename
to avoid that Werkzeug raises an UnicodeDecodeError.

Fixes #6160
opw:634205
This commit is contained in:
Goffin Simon 2015-05-04 12:01:49 +02:00
parent 8aa6aa0c78
commit f300d648a8
1 changed files with 1 additions and 1 deletions

View File

@ -527,7 +527,7 @@ def content_disposition(filename, req):
if browser == 'msie' and version < 9:
return "attachment; filename=%s" % escaped
elif browser == 'safari':
return "attachment; filename=%s" % filename
return "attachment; filename=\"%s\"" % filename
else:
return "attachment; filename*=UTF-8''%s" % escaped