py3: misc fixes

This commit is contained in:
Kovid Goyal 2019-04-03 14:33:48 +05:30
parent 3c64ea0995
commit fa52a609be
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ from calibre.ebooks.oeb.iterator.spine import (SpineItem, create_indexing_data)
from calibre.ebooks.oeb.iterator.bookmarks import BookmarksMixin
from calibre.ebooks.oeb.base import urlparse, urlunquote
TITLEPAGE = CoverManager.SVG_TEMPLATE.decode('utf-8').replace(
TITLEPAGE = CoverManager.SVG_TEMPLATE.replace(
'__ar__', 'none').replace('__viewbox__', '0 0 600 800'
).replace('__width__', '600').replace('__height__', '800')

View File

@ -16,7 +16,7 @@ from polyglot.urllib import unquote
class CoverManager(object):
SVG_TEMPLATE = textwrap.dedent('''\
SVG_TEMPLATE = textwrap.dedent(u'''\
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@ -40,7 +40,7 @@ class CoverManager(object):
</html>
''')
NONSVG_TEMPLATE = textwrap.dedent('''\
NONSVG_TEMPLATE = textwrap.dedent(u'''\
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />