Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1644 -- work around issues with IDNs #1668

Merged
merged 2 commits into from Apr 24, 2015
Merged

fix #1644 -- work around issues with IDNs #1668

merged 2 commits into from Apr 24, 2015

Conversation

Kwpolska
Copy link
Member

Encode IDNs to Punycode in nikola init and in links;
show an error if the site URL is not Punycode.

Signed-off-by: Chris Warrick kwpolska@gmail.com

Encode IDNs to Punycode in ``nikola init`` and in links;
show an error if the site URL is not Punycode.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member Author

cc @ralsina @Thehellstorm

waiting for reviews.

nikola init output:

Site URL [http://getnikola.com/]: ąbć.pl/ó
    ERROR: You must specify a protocol (http or https).
Site URL [http://getnikola.com/]: http://ąbć.pl/ó
    The URL does not end in '/' -- adding it.
    Converting to Punycode: http://xn--b-vhah.pl/ó/

(also sneaked in / and http(s):// validation!)

nikola build output (if http://ąbć.pl/ó/ is typed in manually):

[2015-04-24T17:21:00Z] ERROR: Nikola: Your BASE_URL or SITE_URL contains an IDN expressed in Unicode.  Please convert it to Punycode.
[2015-04-24T17:21:00Z] ERROR: Nikola: Punycode of ąbć.pl: xn--b-vhah.pl

Isso is not fixed, can’t do that easily (we would have to explicitly check for it, which is a lot of work — documented an impact of IDNs in the manual)

@ralsina
Copy link
Member

ralsina commented Apr 24, 2015

LGTM

Kwpolska added a commit that referenced this pull request Apr 24, 2015
fix #1644 -- work around issues with IDNs
@Kwpolska Kwpolska merged commit 57d46d2 into master Apr 24, 2015
@Kwpolska Kwpolska deleted the punycode branch April 24, 2015 18:01
@gerritsangel
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants