Browse Source

[fix] unicode (en|de)coding

asciimoo 11 years ago
parent
commit
15b8b7d9bb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      searx/webapp.py

+ 2 - 2
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__":