File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
ui/packages/platform/src/pages/Bot Expand file tree Collapse file tree 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) => {
275275 setDebugVisible ( prevState => ! prevState )
276276 }
277277
278-
279278 const renderers = useMemo < Components > ( ( ) => ( {
280279 p : ( { node, ...props } ) => < div { ...props } /> ,
281280 img : ( { node, ...props } ) => < img style = { { maxWidth : '60%' } } { ...props } /> ,
@@ -368,7 +367,7 @@ export const Message = React.memo((props: MessageProps) => {
368367 : < ReactMarkdown
369368 className = { classes . markdown }
370369 children = { contentToRender || '' }
371- rehypePlugins = { [ rehypeRaw ] }
370+ rehypePlugins = { isAi ? [ rehypeRaw ] : [ ] }
372371 remarkPlugins = { [ remarkGfm ] }
373372 linkTarget = '_blank'
374373 components = { renderers }
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ export const disallowedHtmlTagsForMarkdown= [
3636 'frameset' ,
3737 'audio' ,
3838 'video' ,
39+ 'button' ,
40+ 'select' ,
41+ 'option' ,
42+ 'textarea'
3943] ;
4044
4145export const createMessageFragment = ( messages : DebugMessage [ ] ) : DocumentFragment => {
You can’t perform that action at this time.
0 commit comments