Server: Fix books that contain broken links with unicode characters in their paths not working with the browser viewer. Fixes #1704498 [Private bug](https://bugs.launchpad.net/calibre/+bug/1704498)

This commit is contained in:
Kovid Goyal 2017-07-30 20:36:26 +05:30
parent 3a76f6387e
commit 7e0a9ea6c0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -322,6 +322,8 @@ class Container(ContainerBase):
frag = urlunquote(frag)
url = resource_template.format(encode_url(name, frag))
else:
if isinstance(name, unicode):
name = name.encode('utf-8')
url = 'missing:' + quote(name)
changed.add(base)
return url