diff --git a/public/js/lib/renderer/lightbox/index.js b/public/js/lib/renderer/lightbox/index.js index 3619e0ae..e46e0a14 100644 --- a/public/js/lib/renderer/lightbox/index.js +++ b/public/js/lib/renderer/lightbox/index.js @@ -1,4 +1,5 @@ import './lightbox.css' +import escape from 'lodash/escape' let images = [] /** @type {HTMLImageElement} */ @@ -74,7 +75,7 @@ function setImageInner (img, lightBoxContainer) { const src = img.getAttribute('src') const alt = img.getAttribute('alt') - lightBoxContainer.querySelector('.lightbox-inner').innerHTML = `${alt}` + lightBoxContainer.querySelector('.lightbox-inner').innerHTML = `${escape(alt)}` addImageDragListener(lightBoxContainer.querySelector('.lightbox-inner img')) }