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

Use escapeHTML on book chapter titles

This commit is contained in:
Vincent Lark 2023-10-26 18:54:50 +02:00 committed by Bill Thornton
parent 38d8cafc73
commit 55f5a78f5e

View file

@ -1,3 +1,4 @@
import escapeHTML from 'escape-html';
import dialogHelper from '../../components/dialogHelper/dialogHelper';
export default class TableOfContents {
@ -56,7 +57,7 @@ export default class TableOfContents {
// remove parent directory reference from href to fix certain books
const link = chapter.href.startsWith('../') ? chapter.href.slice(3) : chapter.href;
itemHtml += `<a href="${book.path.directory + link}">${chapter.label}</a>`;
itemHtml += `<a href="${escapeHTML(book.path.directory + link)}">${escapeHTML(chapter.label)}</a>`;
if (chapter.subitems?.length) {
const subHtml = chapter.subitems