Skip to content

Commit c7203d7

Browse files
committed
Fix: Use DOMPurify to filter out dangerous HTML #infiniflow#7668
1 parent a854250 commit c7203d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/pages/chat/markdown-content/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const MarkdownContent = ({
5050
const { setDocumentIds, data: fileThumbnails } =
5151
useFetchDocumentThumbnailsByIds();
5252
const contentWithCursor = useMemo(() => {
53-
let text = content;
53+
let text = DOMPurify.sanitize(content);
5454
if (text === '') {
5555
text = t('chat.searching');
5656
}

0 commit comments

Comments
 (0)