mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 09:45:58 +08:00
### What problem does this PR solve? feat: Make agent template support HTML #1842 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
6df0f44e71
commit
7c98cb5075
@ -7,6 +7,7 @@ import { useCallback, useState } from 'react';
|
|||||||
import CreateAgentModal from './create-agent-modal';
|
import CreateAgentModal from './create-agent-modal';
|
||||||
import GraphAvatar from './graph-avatar';
|
import GraphAvatar from './graph-avatar';
|
||||||
|
|
||||||
|
import DOMPurify from 'dompurify';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
const { Title, Text, Paragraph } = Typography;
|
const { Title, Text, Paragraph } = Typography;
|
||||||
@ -83,7 +84,11 @@ const AgentTemplateModal = ({ visible, hideModal, loading, onOk }: IProps) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
<div className={styles.agentDescription}>
|
<div className={styles.agentDescription}>
|
||||||
<Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}>
|
<Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}>
|
||||||
{x.description}
|
<div
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: DOMPurify.sanitize(x.description),
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</div>
|
</div>
|
||||||
{selectedId === x.id && (
|
{selectedId === x.id && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user