We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 381b3ff commit 26a2c74Copy full SHA for 26a2c74
public/js/lib/renderer/lightbox/index.js
@@ -1,4 +1,5 @@
1
import './lightbox.css'
2
+import escape from 'lodash/escape'
3
4
let images = []
5
/** @type {HTMLImageElement} */
@@ -74,7 +75,7 @@ function setImageInner (img, lightBoxContainer) {
74
75
const src = img.getAttribute('src')
76
const alt = img.getAttribute('alt')
77
- lightBoxContainer.querySelector('.lightbox-inner').innerHTML = `<img src="${src}" alt="${alt}" draggable="false">`
78
+ lightBoxContainer.querySelector('.lightbox-inner').innerHTML = `<img src="${escape(src)}" alt="${escape(alt)}" draggable="false">`
79
addImageDragListener(lightBoxContainer.querySelector('.lightbox-inner img'))
80
}
81
0 commit comments