mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle external URIs in OEBBook URI processing.
This commit is contained in:
parent
c2aa71e851
commit
88fe4020f1
@ -447,7 +447,7 @@ class Manifest(object):
|
|||||||
return cmp(skey, okey)
|
return cmp(skey, okey)
|
||||||
|
|
||||||
def relhref(self, href):
|
def relhref(self, href):
|
||||||
if '/' not in self.href:
|
if '/' not in self.href or ':' in href:
|
||||||
return href
|
return href
|
||||||
base = os.path.dirname(self.href).split('/')
|
base = os.path.dirname(self.href).split('/')
|
||||||
target, frag = urldefrag(href)
|
target, frag = urldefrag(href)
|
||||||
@ -463,7 +463,7 @@ class Manifest(object):
|
|||||||
return relhref
|
return relhref
|
||||||
|
|
||||||
def abshref(self, href):
|
def abshref(self, href):
|
||||||
if '/' not in self.href:
|
if '/' not in self.href or ':' in href:
|
||||||
return href
|
return href
|
||||||
dirname = os.path.dirname(self.href)
|
dirname = os.path.dirname(self.href)
|
||||||
href = os.path.join(dirname, href)
|
href = os.path.join(dirname, href)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user