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

Sanitize HTML

This commit is contained in:
Dmitry Lyzo 2022-01-30 18:29:40 +03:00
parent 59adbc348a
commit 8420d0fef2
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,5 @@
import { intervalToDuration } from 'date-fns';
import DOMPurify from 'dompurify';
import escapeHtml from 'escape-html';
import { appHost } from '../../components/apphost';
import loading from '../../components/loading/loading';
@ -902,7 +903,7 @@ function renderOverview(page, item) {
const overviewElements = page.querySelectorAll('.overview');
if (overviewElements.length > 0) {
const overview = item.Overview || '';
const overview = DOMPurify.sanitize(item.Overview || '');
if (overview) {
for (const overviewElemnt of overviewElements) {