Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Permit <base> tags for willing users (cc @Aeyoun)
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 2, 2015
1 parent d2e3b02 commit aaa9fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/nikola.py
Expand Up @@ -1017,7 +1017,7 @@ def render_template(self, template_name, output_name, context):
utils.makedirs(os.path.dirname(output_name))
parser = lxml.html.HTMLParser(remove_blank_text=True)
doc = lxml.html.document_fromstring(data, parser)
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']))
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']), resolve_base_href=False)
data = b'<!DOCTYPE html>\n' + lxml.html.tostring(doc, encoding='utf8', method='html', pretty_print=True)
with open(output_name, "wb+") as post_file:
post_file.write(data)
Expand Down

0 comments on commit aaa9fb2

Please sign in to comment.