mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2067257 [Unhandeled exception](https://bugs.launchpad.net/calibre/+bug/2067257)
This commit is contained in:
parent
5cf6498bc9
commit
bed99fc552
@ -48,7 +48,7 @@ all_author_searches = AUTHOR_SEARCHES.__iter__
|
||||
|
||||
def qquote(val, use_plus=True):
|
||||
if not isinstance(val, bytes):
|
||||
val = val.encode('utf-8')
|
||||
val = val.encode('utf-8', 'replace')
|
||||
ans = quote_plus(val) if use_plus else quote(val)
|
||||
if isinstance(ans, bytes):
|
||||
ans = ans.decode('utf-8')
|
||||
|
Loading…
x
Reference in New Issue
Block a user