File tree 2 files changed +5
-2
lines changed
ui/packages/platform/src/pages/Bot
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,6 @@ export const Message = React.memo((props: MessageProps) => {
275
275
setDebugVisible ( prevState => ! prevState )
276
276
}
277
277
278
-
279
278
const renderers = useMemo < Components > ( ( ) => ( {
280
279
p : ( { node, ...props } ) => < div { ...props } /> ,
281
280
img : ( { node, ...props } ) => < img style = { { maxWidth : '60%' } } { ...props } /> ,
@@ -368,7 +367,7 @@ export const Message = React.memo((props: MessageProps) => {
368
367
: < ReactMarkdown
369
368
className = { classes . markdown }
370
369
children = { contentToRender || '' }
371
- rehypePlugins = { [ rehypeRaw ] }
370
+ rehypePlugins = { isAi ? [ rehypeRaw ] : [ ] }
372
371
remarkPlugins = { [ remarkGfm ] }
373
372
linkTarget = '_blank'
374
373
components = { renderers }
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ export const disallowedHtmlTagsForMarkdown= [
36
36
'frameset' ,
37
37
'audio' ,
38
38
'video' ,
39
+ 'button' ,
40
+ 'select' ,
41
+ 'option' ,
42
+ 'textarea'
39
43
] ;
40
44
41
45
export const createMessageFragment = ( messages : DebugMessage [ ] ) : DocumentFragment => {
You can’t perform that action at this time.
0 commit comments