diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py index d22236538d..8812f59869 100644 --- a/src/calibre/srv/render_book.py +++ b/src/calibre/srv/render_book.py @@ -377,9 +377,9 @@ class Container(ContainerBase): link_xpath = XPath('//h:a[@href]') img_xpath = XPath('//h:img[@src]') res_link_xpath = XPath('//h:link[@href]') - head = ensure_head(self.parsed(name)) - changed = False root = self.parsed(name) + head = ensure_head(root) + changed = False for style in style_xpath(root): # Firefox flakes out sometimes when dynamically creating