[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:
parent
8aa6aa0c78
commit
f300d648a8
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue