[fix] convert query to string to produce valid filename for csv output

This commit is contained in:
Adam Tauber 2020-03-13 00:57:01 +01:00
parent 018b681841
commit 58a630308a
1 changed files with 1 additions and 1 deletions

View File

@ -643,7 +643,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.query)
cont_disp = 'attachment;Filename=searx_-_{0}.csv'.format(search_query.query.decode('utf-8'))
response.headers.add('Content-Disposition', cont_disp)
return response
elif output_format == 'rss':