Browse Source

Fix: Use DOMPurify to filter out dangerous HTML #7668 (#7669)

### What problem does this PR solve?

Fix: Use DOMPurify to filter out dangerous HTML #7668

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.0
balibabu 5 months ago
parent
commit
d373c46976
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      web/src/pages/chat/markdown-content/index.tsx

+ 1
- 1
web/src/pages/chat/markdown-content/index.tsx View File

const { setDocumentIds, data: fileThumbnails } = const { setDocumentIds, data: fileThumbnails } =
useFetchDocumentThumbnailsByIds(); useFetchDocumentThumbnailsByIds();
const contentWithCursor = useMemo(() => { const contentWithCursor = useMemo(() => {
let text = content;
let text = DOMPurify.sanitize(content);
if (text === '') { if (text === '') {
text = t('chat.searching'); text = t('chat.searching');
} }

Loading…
Cancel
Save