Skip to content

Commit

Permalink
fix: disable support html tag in markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Dec 31, 2024
1 parent d72f878 commit 8e593f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/web/src/components/Markdown/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { isValidStr, parseUrlStr, useTranslation } from 'tailchat-shared';
import { Loadable } from '../Loadable';
import { Image } from 'tailchat-design';
import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw';
// import rehypeRaw from 'rehype-raw';
// import rehypeSanitize from 'rehype-sanitize';
import './render.less';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand Down Expand Up @@ -81,7 +82,7 @@ export const Markdown: React.FC<{
transformImageUri={(src) => transformUrl(src)}
transformLinkUri={(href) => transformUrl(href)}
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeRaw]}
// rehypePlugins={[rehypeRaw, rehypeSanitize]}
linkTarget="_blank"
skipHtml={true}
components={components}
Expand Down

0 comments on commit 8e593f7

Please sign in to comment.