From df50dd958ebd699a6d53ea34b4d995d9f82a0ad4 Mon Sep 17 00:00:00 2001 From: Stuart Axon Date: Thu, 12 Oct 2017 16:28:30 +0100 Subject: [PATCH] Make file path be from root --- pelican/tools/pelican_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index f85e7a3c..26df1a4d 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -39,11 +39,11 @@ def decode_wp_content(content, attached_files=None, br=True): for path, urls in attached_files.items(): for url in urls: content = re.sub(r'(]*href=")%s(")' % url, - r'\1%s\2' % path, + r'\1/%s\2' % path, content) content = re.sub(r'(]*src=")%s(")' % url, - r'\1%s\2' % path, + r'\1/%s\2' % path, content) content += "\n"