Skip to content

Commit

Permalink
xpath not findall
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Sep 1, 2015
1 parent a970c13 commit 79833b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/nikola.py
Expand Up @@ -1104,7 +1104,7 @@ def rewrite_links(self, doc, src, lang):
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, lang), resolve_base_href=False)

# lxml ignores srcset in img and source elements, so do that by hand
objs = list(doc.findall('(*//img|*//source)'))
objs = list(doc.xpath('(*//img|*//source)'))
for obj in objs:
if 'srcset' in obj.attrib:
urls = [u.strip() for u in obj.attrib['srcset'].split(',')]
Expand Down

0 comments on commit 79833b8

Please sign in to comment.