Skip to content
Browse files

Permit <base> tags for willing users (cc @Aeyoun)

Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Aug 2, 2015
1 parent d2e3b02 commit aaa9fb296891927428669f94ce21be719aee663b
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/
@@ -1017,7 +1017,7 @@ def render_template(self, template_name, output_name, context):
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:

0 comments on commit aaa9fb2

Please sign in to comment.