Fix ISBNdb plugin not handling non ascii queries

This commit is contained in:
Kovid Goyal 2011-04-29 09:57:49 -06:00
parent 88aca5bfa8
commit 107912f63f

View File

@ -81,7 +81,7 @@ class ISBNDB(Source):
author_tokens = self.get_author_tokens(authors, author_tokens = self.get_author_tokens(authors,
only_first_author=True) only_first_author=True)
tokens += author_tokens tokens += author_tokens
tokens = [quote(t) for t in tokens] tokens = [quote(t.encode('utf-8') if isinstance(t, unicode) else t) for t in tokens]
q = '+'.join(tokens) q = '+'.join(tokens)
q = 'index1=combined&value1='+q q = 'index1=combined&value1='+q