mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Sanitize HTML
This commit is contained in:
parent
59adbc348a
commit
8420d0fef2
2 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
import DOMPurify from 'dompurify';
|
||||
import escapeHtml from 'escape-html';
|
||||
import dialogHelper from '../dialogHelper/dialogHelper';
|
||||
import dom from '../../scripts/dom';
|
||||
|
@ -54,7 +55,7 @@ import template from './dialog.template.html';
|
|||
}
|
||||
|
||||
const displayText = options.html || options.text || '';
|
||||
dlg.querySelector('.text').innerHTML = displayText;
|
||||
dlg.querySelector('.text').innerHTML = DOMPurify.sanitize(displayText);
|
||||
|
||||
if (!displayText) {
|
||||
dlg.querySelector('.dialogContentInner').classList.add('hide');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue