1
0
Fork 0
forked from github/pelican

Replace \ with / when replacing the URLs. See #763

This commit is contained in:
Alexis Métaireau 2013-03-10 23:09:43 -07:00
commit c6856dec44

View file

@ -189,12 +189,13 @@ class Content(object):
if value in self._context['filenames']:
origin = '/'.join((siteurl,
self._context['filenames'][value].url))
origin = origin.replace('\\', '/') # Fow windows paths.
else:
logger.warning("Unable to find {fn}, skipping url"
" replacement".format(fn=value))
return m.group('markup') + m.group('quote') + origin \
+ m.group('quote')
return ''.join((m.group('markup'), m.group('quote'), origin,
m.group('quote')))
return hrefs.sub(replacer, content)