[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user