Fix security vulnerabilities

This commit is contained in:
gpt-engineer-app[bot]
2025-10-16 20:01:21 +00:00
parent f176c28df6
commit cdd9e6c8c6
7 changed files with 192 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
import ReactMarkdown from 'react-markdown';
import rehypeSanitize from 'rehype-sanitize';
import { cn } from '@/lib/utils';
interface MarkdownRendererProps {
@@ -25,7 +26,10 @@ export function MarkdownRenderer({ content, className }: MarkdownRendererProps)
className
)}
>
<ReactMarkdown>
<ReactMarkdown
rehypePlugins={[rehypeSanitize]}
skipHtml={true}
>
{content}
</ReactMarkdown>
</div>