Skip to content
Permalink
Browse files

fix #1803

  • Loading branch information
ralsina committed Jun 10, 2015
1 parent 8266fcd commit db77b8e4c1cdb3c34ea616ffb61002d4ab3d3fb1
Showing with 8 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +7 −1 nikola/nikola.py
@@ -11,6 +11,7 @@ Features
Bugfixes
--------

* IDNA mixing unicode/bytes in python 3 (Issue #1803)
* Cleaner splitting of metadata in onefile posts (Issue #973)
* It's markdown extra, not extras (Issue #1799)

@@ -1026,7 +1026,13 @@ def url_replacer(self, src, dst, lang=None, url_type=None):
# python 3: already unicode
pass
nl = nl.encode('idna')

if isinstance(nl, utils.bytes_str):
nl = nl.decode('latin-1') # so idna stays unchanged
print(repr((dst_url.scheme,
nl,
dst_url.path,
dst_url.query,
dst_url.fragment)))
dst = urlunsplit((dst_url.scheme,
nl,
dst_url.path,

0 comments on commit db77b8e

Please sign in to comment.