Skip to content
Permalink
Browse files

Don’t get involved, lxml.

  • Loading branch information
da2x committed Aug 2, 2015
1 parent 501579d commit 37f2829429b95618d66a4bc89c6fa04eeb6fd576
Showing with 2 additions and 2 deletions.
  1. +1 −1 nikola/data/themes/bootstrap3/templates/base_helper.tmpl
  2. +1 −1 nikola/nikola.py
@@ -27,7 +27,7 @@ lang="${lang}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="{{ abs_link(permalink) }}">
<base href="${abs_link(permalink)}">

%if description:
<meta name="description" content="${description}">
@@ -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)

0 comments on commit 37f2829

Please sign in to comment.
You can’t perform that action at this time.