fix: has unsafe elements
This commit is contained in:
parent
30da183578
commit
8ef3ef2a8f
@ -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…
x
Reference in New Issue
Block a user