From 15b8b7d9bbfce1835384f9e6c32550f8f4d01cc1 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Tue, 15 Oct 2013 22:36:48 +0200 Subject: [PATCH] [fix] unicode (en|de)coding --- searx/webapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index e0ff9a7d0..fb8e489e7 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -51,9 +51,9 @@ def index(): for pd_name,pd in request.form.items(): if pd_name.startswith('engine_'): selected_engines.append(pd_name[7:]) - query = request.form['q'] + query = request.form['q'].encode('utf-8') results = search(query, request, selected_engines) - return render('results.html', results=results, q=query) + return render('results.html', results=results, q=query.decode('utf-8')) return render('index.html') if __name__ == "__main__":