From 871387ca9e20ac06798ab32c4ae976300a66c653 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 14 May 2018 17:21:35 +0200 Subject: [FIX] web: Impossible to add an attachment on Safari Fine tuning of cd6150fe9e63d7785f140ea1e2b3090bb1a2e10b opw:1840373 --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/controllers/main.py') diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 03f73d8f947..d6c007f8f83 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1116,7 +1116,7 @@ class Binary(http.Controller): if request.httprequest.user_agent.browser == 'safari': # Safari sends NFD UTF-8 (where é is composed by 'e' and [accent]) # we need to send it the same stuff, otherwise it'll fail - filename = unicodedata.normalize('NFD', ufile.filename).encode('UTF-8') + filename = unicodedata.normalize('NFD', ufile.filename) try: attachment = Model.create({ -- cgit v1.2.3