mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
xss fix
This commit is contained in:
parent
d646239c37
commit
e92b794700
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ jQuery(document).ready(function() {
|
||||||
var text, clip = new Clipboard('.anchor');
|
var text, clip = new Clipboard('.anchor');
|
||||||
$("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){
|
$("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){
|
||||||
var element = $(this);
|
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;
|
var link = url + "#"+element[0].id;
|
||||||
return " <span class='anchor' data-clipboard-text='"+link+"'>" +
|
return " <span class='anchor' data-clipboard-text='"+link+"'>" +
|
||||||
"<i class='fas fa-link fa-lg'></i>" +
|
"<i class='fas fa-link fa-lg'></i>" +
|
||||||
|
|
Loading…
Reference in a new issue