diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx index dc985bd6df..f324b67f1f 100644 --- a/web/app/components/base/markdown.tsx +++ b/web/app/components/base/markdown.tsx @@ -239,7 +239,7 @@ const Link = ({ node, ...props }: any) => { } } -export function Markdown(props: { content: string; className?: string }) { +export function Markdown(props: { content: string; className?: string; customDisallowedElements?: string[] }) { const latexContent = flow([ preprocessThinkTag, preprocessLaTeX, @@ -274,7 +274,7 @@ export function Markdown(props: { content: string; className?: string }) { } }, ]} - disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body', 'input']} + disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body', ...(props.customDisallowedElements || [])]} components={{ code: CodeBlock, img: Img, diff --git a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx index af2989b188..46ad48a936 100644 --- a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx +++ b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx @@ -181,6 +181,7 @@ const ChunkContent: FC = ({ ) } diff --git a/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx b/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx index a528f5e1b1..319acad4d2 100644 --- a/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx +++ b/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx @@ -50,6 +50,7 @@ const ChunkContent: FC = ({ className, )} content={sign_content || content || ''} + customDisallowedElements={['input']} /> } diff --git a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx index 463a32e4d0..36ef75f062 100644 --- a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx +++ b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx @@ -60,6 +60,7 @@ const ChunkDetailModal: FC = ({ {!isParentChildRetrieval && keywords && keywords.length > 0 && (
diff --git a/web/app/components/datasets/hit-testing/components/result-item.tsx b/web/app/components/datasets/hit-testing/components/result-item.tsx index 12cbceff9c..10a528c224 100644 --- a/web/app/components/datasets/hit-testing/components/result-item.tsx +++ b/web/app/components/datasets/hit-testing/components/result-item.tsx @@ -47,7 +47,11 @@ const ResultItem: FC = ({ {/* Main */}
- + {isParentChildRetrieval && (