mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 19:26:15 +01:00
Unquote hrefs when creating OPF 2.0
This commit is contained in:
parent
b34854b6e4
commit
e63f8a2cb7
1 changed files with 2 additions and 2 deletions
|
|
@ -1026,7 +1026,7 @@ def to_opf2(self, parent=None):
|
|||
media_type = XHTML_MIME
|
||||
elif media_type in OEB_STYLES:
|
||||
media_type = CSS_MIME
|
||||
attrib = {'id': item.id, 'href': item.href,
|
||||
attrib = {'id': item.id, 'href': urlunquote(item.href),
|
||||
'media-type': media_type}
|
||||
if item.fallback:
|
||||
attrib['fallback'] = item.fallback
|
||||
|
|
@ -1238,7 +1238,7 @@ def to_opf1(self, parent=None):
|
|||
def to_opf2(self, parent=None):
|
||||
elem = element(parent, OPF('guide'))
|
||||
for ref in self.refs.values():
|
||||
attrib = {'type': ref.type, 'href': ref.href}
|
||||
attrib = {'type': ref.type, 'href': urlunquote(ref.href)}
|
||||
if ref.title:
|
||||
attrib['title'] = ref.title
|
||||
element(elem, OPF('reference'), attrib=attrib)
|
||||
|
|
|
|||
Loading…
Reference in a new issue