diff --git a/static/js/hugo-learn.js b/static/js/hugo-learn.js index 6faf8d7274..c95f73aac7 100644 --- a/static/js/hugo-learn.js +++ b/static/js/hugo-learn.js @@ -68,7 +68,7 @@ jQuery(document).ready(function() { var text, clip = new Clipboard('.anchor'); $("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){ var element = $(this); - var url = document.location.origin + document.location.pathname; + var url = encodeURI(document.location.origin + document.location.pathname); var link = url + "#"+element[0].id; return " " + "" +