This commit is contained in:
Kovid Goyal 2019-08-29 11:13:53 +05:30
parent 7710697ea1
commit 20f6152a95
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -356,8 +356,10 @@ class Container(ContainerBase):
self.virtualized_names.add(name) self.virtualized_names.add(name)
root = self.parsed(name) root = self.parsed(name)
for img in img_xpath(root): for img in img_xpath(root):
img.set('data-calibre-src', self.href_to_name(img.get('src'), name)) img_name = self.href_to_name(img.get('src'), name)
changed.add(name) if img_name:
img.set('data-calibre-src', )
changed.add(name)
for link in res_link_xpath(root): for link in res_link_xpath(root):
ltype = (link.get('type') or 'text/css').lower() ltype = (link.get('type') or 'text/css').lower()
rel = (link.get('rel') or 'stylesheet').lower() rel = (link.get('rel') or 'stylesheet').lower()