Skip to content

Commit

Permalink
Fix episode overview sanitized & html support
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaitanya-Shahare committed Jun 7, 2024
1 parent 100791a commit 59126c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/listview/listview.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ 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') {
Expand Down Expand Up @@ -416,7 +417,7 @@ export function getListViewHtml(options) {
}

if (enableOverview && item.Overview) {
const overview = markdownIt().render(item.Overview || '');
const overview = DOMPurify.sanitize(markdownIt({ html: true }).render(item.Overview || ''));
html += '<div class="secondary listItem-overview listItemBodyText">';
html += '<bdi>' + overview + '</bdi>';
html += '</div>';
Expand Down

0 comments on commit 59126c3

Please sign in to comment.