From 4d1dc94f683e6aeb24fa5383aa1cf7eeb4128702 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 21 Feb 2014 00:00:00 +0000 Subject: [PATCH] fix img url. --- blogtopoid/blogtopoid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blogtopoid/blogtopoid.py b/blogtopoid/blogtopoid.py index c92b9d7..af51f33 100644 --- a/blogtopoid/blogtopoid.py +++ b/blogtopoid/blogtopoid.py @@ -165,9 +165,9 @@ class Post(object): d = PyQuery(self.body) for img in d.find('img'): if not '/' in img.attrib['src']: - img.attrib['src'] = ''.join([config.blogurl, - self.outputpath, - img.attrib['src']]) + img.attrib['src'] = '{}{}/{}'.format(config.blogurl, + self.outputpath, + img.attrib['src']) self.body = d.html() elif self.extension == '.rst': rst = publish_parts(