Skip to content

Commit

Permalink
xss fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAllen2tgt committed Oct 11, 2018
1 parent 62ba84c commit 62f1a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/hugo-learn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 " <span class='anchor' data-clipboard-text='"+link+"'>" +
"<i class='fas fa-link fa-lg'></i>" +
Expand Down

0 comments on commit 62f1a23

Please sign in to comment.