### What problem does this PR solve? This PR resolves issue #1491 related to HTML Injection and Cross-Site Scripting (XSS). The issue was caused by the unsafe usage of `dangerouslySetInnerHTML` without proper sanitization of user input. ### Changes - Added DOMPurify dependency. - Updated the following components to use DOMPurify: - `web/src/pages/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx` - `web/src/pages/chat/markdown-content/index.tsx` - `web/src/pages/add-knowledge/components/knowledge-setting/category-panel.tsx` ### Type of change - [x] Other (please describe): Security Fix |
||
|---|---|---|
| .. | ||
| .husky | ||
| public | ||
| src | ||
| .env | ||
| .eslintrc.js | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| .umirc.ts | ||
| externals.d.ts | ||
| jest-setup.ts | ||
| jest.config.ts | ||
| package-lock.json | ||
| package.json | ||
| reducer.js | ||
| tsconfig.json | ||
| typings.d.ts | ||