mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix: has unsafe elements
This commit is contained in:
parent
e9ad8f3494
commit
4588921a2c
@ -36,7 +36,7 @@ const Markdown: FC<Props> = ({ message }) => {
|
||||
}, [message.content, message.status, t])
|
||||
|
||||
const rehypePlugins = useMemo(() => {
|
||||
const hasUnsafeElements = /<(input|textarea|select)/i.test(messageContent)
|
||||
const hasUnsafeElements = /<(input|textarea|select|menuitem)/i.test(messageContent)
|
||||
return hasUnsafeElements ? [rehypeMath] : [rehypeRaw, rehypeMath]
|
||||
}, [messageContent, rehypeMath])
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user