[fix] csv results filename encoding

This commit is contained in:
Adam Tauber 2016-03-16 10:43:28 +01:00
parent e893d94185
commit 0f518e489e
1 changed files with 1 additions and 1 deletions

View File

@ -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':