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

replace marked with markdown-it

This commit is contained in:
rafma0 2023-11-15 03:11:45 -03:00
parent 53312b1520
commit 4a17c78a85
6 changed files with 146 additions and 25 deletions

View file

@ -1,6 +1,6 @@
import { intervalToDuration } from 'date-fns';
import DOMPurify from 'dompurify';
import { marked } from 'marked';
import markdownIt from 'markdown-it';
import escapeHtml from 'escape-html';
import isEqual from 'lodash-es/isEqual';
@ -859,7 +859,7 @@ function renderOverview(page, item) {
const overviewElements = page.querySelectorAll('.overview');
if (overviewElements.length > 0) {
const overview = DOMPurify.sanitize(marked(item.Overview || ''));
const overview = DOMPurify.sanitize(markdownIt().render(item.Overview || ''));
if (overview) {
for (const overviewElemnt of overviewElements) {