From 62f1a23079adde9219dca20499292af27483d742 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 6faf8d72744..c95f73aac7c 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 " " + "" +