From 0f518e489ed1461282bc32a9a1faf310feebb1ba Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Wed, 16 Mar 2016 10:43:28 +0100 Subject: [PATCH] [fix] csv results filename encoding --- searx/webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index 665eeef2..66ba65a2 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -433,7 +433,7 @@ def index(): csv.writerow([row.get(key, '') for key in keys]) csv.stream.seek(0) response = Response(csv.stream.read(), mimetype='application/csv') - cont_disp = 'attachment;Filename=searx_-_{0}.csv'.format(search.query) + cont_disp = 'attachment;Filename=searx_-_{0}.csv'.format(search.query.encode('utf-8')) response.headers.add('Content-Disposition', cont_disp) return response elif search.request_data.get('format') == 'rss':