feat: 取消订单
This commit is contained in:
16
src/components/DangerouslySetInnerHTML/index.tsx
Normal file
16
src/components/DangerouslySetInnerHTML/index.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import DOMPurify from 'dompurify';
|
||||
import React from 'react';
|
||||
import styles from './index.module.less';
|
||||
|
||||
const DangerouslySetInnerHTML = (props: { content?: string }) => {
|
||||
const { content = '' } = props;
|
||||
return (
|
||||
<div
|
||||
className={styles.dangerouslySetInnerHTML}
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: 已使用 DOMPurify 进行 HTML 净化
|
||||
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(content) }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(DangerouslySetInnerHTML);
|
||||
Reference in New Issue
Block a user