Skip to content
Permalink
Browse files
Fix #2377 argument order
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 17, 2016
1 parent 02affdc commit c8c4dc4bccba55258495a0c92cd7f53ebbb51543
Showing with 1 addition and 1 deletion.
  1. +1 −1 nikola/utils.py
@@ -805,7 +805,7 @@ def encodelink(iri):
"""Given an encoded or unencoded link string, return an encoded string suitable for use as a link in HTML and XML."""
iri = unicodenormalize('NFC', iri)
link = OrderedDict(urlparse(iri)._asdict())
link['path'] = urlquote(urlunquote(link['path'], safe="/~").encode('utf-8'))
link['path'] = urlquote(urlunquote(link['path']).encode('utf-8'), safe="/~")
try:
link['netloc'] = link['netloc'].encode('utf-8').decode('idna').encode('idna').decode('utf-8')
except UnicodeDecodeError:

0 comments on commit c8c4dc4

Please sign in to comment.