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)
- [David Angel](https://github.com/davidangel)
- [Pithaya](https://github.com/Pithaya)
- [Chaitanya Shahare](https://github.com/Chaitanya-Shahare)
## Emby Contributors

View File

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