1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix file name escaping

This commit is contained in:
Dmitry Lyzo 2022-11-06 00:23:58 +03:00
parent 78bbac8ca7
commit 45542a67a4

View file

@ -1,3 +1,5 @@
import escapeHtml from 'escape-html';
import dialogHelper from '../../components/dialogHelper/dialogHelper';
import ServerConnections from '../ServerConnections';
import dom from '../../scripts/dom';
@ -61,7 +63,7 @@ function setFiles(page, files) {
reader.onload = (function (theFile) {
return function () {
// Render file.
const html = `<div><span class="material-icons subtitles" aria-hidden="true" style="transform: translateY(25%);"></span><span>${escape(theFile.name)}</span></div>`;
const html = `<div><span class="material-icons subtitles" aria-hidden="true" style="transform: translateY(25%);"></span><span>${escapeHtml(theFile.name)}</span></div>`;
page.querySelector('#subtitleOutput').innerHTML = html;
page.querySelector('#fldUpload').classList.remove('hide');