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

Merge pull request #5680 from Chaitanya-Shahare/chaitanya/fix-episode-overview-markdown

Fix episode overview markdown render
This commit is contained in:
Bill Thornton 2024-06-08 18:26:43 -04:00 committed by GitHub
commit aed4ffa2cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -87,6 +87,7 @@
- [JPUC1143](https://github.com/Jpuc1143) - [JPUC1143](https://github.com/Jpuc1143)
- [David Angel](https://github.com/davidangel) - [David Angel](https://github.com/davidangel)
- [Pithaya](https://github.com/Pithaya) - [Pithaya](https://github.com/Pithaya)
- [Chaitanya Shahare](https://github.com/Chaitanya-Shahare)
## Emby Contributors ## Emby Contributors

View file

@ -17,6 +17,8 @@ import '../../elements/emby-ratingbutton/emby-ratingbutton';
import '../../elements/emby-playstatebutton/emby-playstatebutton'; import '../../elements/emby-playstatebutton/emby-playstatebutton';
import ServerConnections from '../ServerConnections'; import ServerConnections from '../ServerConnections';
import { getDefaultBackgroundClass } from '../cardbuilder/cardBuilderUtils'; import { getDefaultBackgroundClass } from '../cardbuilder/cardBuilderUtils';
import markdownIt from 'markdown-it';
import DOMPurify from 'dompurify';
function getIndex(item, options) { function getIndex(item, options) {
if (options.index === 'disc') { if (options.index === 'disc') {
@ -415,8 +417,9 @@ export function getListViewHtml(options) {
} }
if (enableOverview && item.Overview) { if (enableOverview && item.Overview) {
const overview = DOMPurify.sanitize(markdownIt({ html: true }).render(item.Overview || ''));
html += '<div class="secondary listItem-overview listItemBodyText">'; html += '<div class="secondary listItem-overview listItemBodyText">';
html += '<bdi>' + item.Overview + '</bdi>'; html += '<bdi>' + overview + '</bdi>';
html += '</div>'; html += '</div>';
} }