mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
security: fix XSS for malicioius image URLs #117
This commit is contained in:
parent
7c1dd4c32c
commit
e9cf2a8580
1 changed files with 2 additions and 1 deletions
|
@ -148,7 +148,8 @@ images.wrap(function(){
|
|||
// IF featherlight is false, do not use feather light
|
||||
if (f != 'false') {
|
||||
if (!image.parent("a").length) {
|
||||
return "<a href='" + image[0].src + "' data-featherlight='image'></a>";
|
||||
var html = $( "<a>" ).attr("href", image[0].src).attr("data-featherlight", "image").get(0).outerHTML;
|
||||
return html;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue