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

bug(random_article): Non-ASCII symbols in URLs #1010

Open
Kristinita opened this issue Apr 6, 2018 · 1 comment
Open

bug(random_article): Non-ASCII symbols in URLs #1010

Kristinita opened this issue Apr 6, 2018 · 1 comment

Comments

@Kristinita
Copy link
Contributor

Kristinita commented Apr 6, 2018

@avaris, ping.

1. Summary

If URL of my article contains Cyrilic symbols:

    incorrect URL open.

else only ASCII symbols:

    URL correct.

2. Environment

  • Python 3.6.4,
  • Pelican 3.7.1,
  • random_article — 2013.4.12.

3. Files

index.html:

<a href="random.html">Random article</a>

Generated random.html (I replace relative URL's to absolute for live demo):

<!DOCTYPE html>
<html>
<head>
<title>random</title>

<script type="text/javascript">
        function redirect(){
            var urls = [

 "https://kristinita.ru/Gingerinas/Тао.html",
 "https://kristinita.ru/Sublime-Text/ValeriyaSpeller.html",

        ""];

        var index = Math.floor(Math.random() * (urls.length-1));
        window.location = urls[index];
    }
</script>
</head>
<body onload="redirect()">
</body>
</html>

4. Steps to reproduce

I install and activate random_article as in plugin description → I run pelican -s pelicanconf.py → I get random.html as in section below → I click to link in index.html → open one of two URLs below:

5. Expected behavior

  • https://kristinita.ru/Sublime-Text/ValeriyaSpeller.html,
  • https://kristinita.ru/Gingerinas/Тао.html.

6. Actual behavior

Cyrillic symbols Тао encode incorrect:

  • https://kristinita.ru/Sublime-Text/ValeriyaSpeller.html,
  • https://kristinita.ru/Gingerinas/Тао.html.

Thanks.

@Kristinita Kristinita changed the title bug(random_article): Non-ASCII symbols in URL's bug(random_article): Non-ASCII symbols in URLs Apr 6, 2018
@Kristinita
Copy link
Contributor Author

@avaris , any ideas, how to fix it?

Thanks.

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

No branches or pull requests

1 participant