This commit is contained in:
Kovid Goyal 2019-10-17 16:44:01 +05:30
parent 997333f0b0
commit c0a9270f0f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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 <style> tags,
# so convert them to external stylesheets to ensure they never fail