Skip to content
Browse files
Stupid mistake.
  • Loading branch information
felixfontein committed Oct 23, 2016
1 parent a1eb111 commit 9fbb5bf0f8fc32cdd9d4a13bad4e4e8eddac942a
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/
@@ -1355,7 +1355,7 @@ def rewrite_links(self, doc, src, lang, url_type=None, is_fragment=False):
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, lang, url_type), resolve_base_href=False)

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

0 comments on commit 9fbb5bf

Please sign in to comment.