From e3633957a9f115da07127fe97c629bb362b2af58 Mon Sep 17 00:00:00 2001 From: "Sean B. Palmer" Date: Wed, 11 Jan 2012 14:18:34 +0000 Subject: New .tr syntax for translations --- modules/search.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/search.py') diff --git a/modules/search.py b/modules/search.py index bfc50bd..13fadbb 100755 --- a/modules/search.py +++ b/modules/search.py @@ -20,6 +20,8 @@ class Grab(web.urllib.URLopener): def google_ajax(query): """Search using AjaxSearch, and return its JSON.""" + if isinstance(query, unicode): + query = query.encode('utf-8') uri = 'http://ajax.googleapis.com/ajax/services/search/web' args = '?v=1.0&safe=off&q=' + web.urllib.quote(query) handler = web.urllib._urlopener -- cgit v1.2.3-1-g7c22