sanitize promptReply Output
This commit is contained in:
parent
c76576a9da
commit
9e2d144dc8
@ -2,6 +2,7 @@
|
||||
import { memo, useRef, useEffect } from "react";
|
||||
import { Warning } from "@phosphor-icons/react";
|
||||
import renderMarkdown from "@/utils/chat/markdown";
|
||||
import DOMPurify from "@/utils/chat/purify";
|
||||
import Citations from "../Citation";
|
||||
import {
|
||||
THOUGHT_REGEX_CLOSE,
|
||||
@ -96,7 +97,9 @@ function RenderAssistantChatContent({ message, messageId }) {
|
||||
)}
|
||||
<span
|
||||
className="break-words"
|
||||
dangerouslySetInnerHTML={{ __html: renderMarkdown(contentRef.current) }}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: DOMPurify.sanitize(renderMarkdown(contentRef.current)),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user