From e92b794700f006095c850bc8b7b038d3139a3774 Mon Sep 17 00:00:00 2001 From: "John.Allen2" Date: Thu, 11 Oct 2018 08:47:20 -0500 Subject: [PATCH] xss fix --- static/js/hugo-learn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 " " + "" +