Skip to content

Commit

Permalink
Merge pull request matcornic#182 from jmaxallen/xss-fix
Browse files Browse the repository at this point in the history
xss fix
  • Loading branch information
matalo33 authored Oct 17, 2018
2 parents 02da1ff + 62f1a23 commit 1cb879f
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 1cb879f

Please sign in to comment.