mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 21:49:00 +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 GraphAvatar from './graph-avatar';
|
||||
|
||||
import DOMPurify from 'dompurify';
|
||||
import styles from './index.less';
|
||||
|
||||
const { Title, Text, Paragraph } = Typography;
|
||||
@ -83,7 +84,11 @@ const AgentTemplateModal = ({ visible, hideModal, loading, onOk }: IProps) => {
|
||||
</Flex>
|
||||
<div className={styles.agentDescription}>
|
||||
<Paragraph ellipsis={{ tooltip: x.description, rows: 5 }}>
|
||||
{x.description}
|
||||
<div
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: DOMPurify.sanitize(x.description),
|
||||
}}
|
||||
></div>
|
||||
</Paragraph>
|
||||
</div>
|
||||
{selectedId === x.id && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user