Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
spaces broke URLs
  • Loading branch information
ralsina committed Aug 21, 2015
1 parent fb6a784 commit a987c7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/nikola.py
Expand Up @@ -1067,7 +1067,8 @@ def rewrite_links(self, doc, src, lang):
objs = list(doc.findall('*//img')) + list(doc.findall('*//source'))
for obj in objs:
if 'srcset' in obj.attrib:
urls = obj.attrib['srcset'].split(',')
from doit.tools import set_trace; set_trace()
urls = [u.strip() for u in obj.attrib['srcset'].split(',')]
urls = [self.url_replacer(src, dst, lang) for dst in urls]
obj.set('srcset', ', '.join(urls))

Expand Down

0 comments on commit a987c7c

Please sign in to comment.