Viewer: Fix SVG images that use xlink:href to refer to paths not being displayed. Note you will have to reload the book to see the fix. Fixes #1847181 [Private bug](https://bugs.launchpad.net/calibre/+bug/1847181)

This commit is contained in:
Kovid Goyal 2019-10-08 21:45:14 +05:30
parent 32382b7b37
commit acad92b5a3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -437,7 +437,9 @@ class Container(ContainerBase):
changed.add(name)
xlink = XLINK('href')
for elem in xlink_xpath(self.parsed(name)):
elem.set(xlink, link_replacer(name, elem.get(xlink)))
href = elem.get(xlink)
if not href.startswith('#'):
elem.set(xlink, link_replacer(name, href))
for name, amap in iteritems(ltm):
for k, v in tuple(iteritems(amap)):