summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-03-13 00:57:01 +0100
committerAdam Tauber <asciimoo@gmail.com>2020-03-13 00:57:01 +0100
commit58a630308a95f886db9de19d562e11890ac35e07 (patch)
tree7316f0788814f2b2b9446c12dc3d1a50d5591b1f
parent018b6818419a1c3044b7d7244b55a62779063071 (diff)
[fix] convert query to string to produce valid filename for csv output
-rw-r--r--searx/webapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 49129d14e..0c5ed4570 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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':