mirror of https://github.com/searxng/searxng.git
[fix] csv results filename encoding
This commit is contained in:
parent
e893d94185
commit
0f518e489e
|
@ -433,7 +433,7 @@ def index():
|
||||||
csv.writerow([row.get(key, '') for key in keys])
|
csv.writerow([row.get(key, '') for key in keys])
|
||||||
csv.stream.seek(0)
|
csv.stream.seek(0)
|
||||||
response = Response(csv.stream.read(), mimetype='application/csv')
|
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)
|
response.headers.add('Content-Disposition', cont_disp)
|
||||||
return response
|
return response
|
||||||
elif search.request_data.get('format') == 'rss':
|
elif search.request_data.get('format') == 'rss':
|
||||||
|
|
Loading…
Reference in New Issue