feat(document-preview): enhance security by sanitizing HTML and Markdown content
- Integrated sanitizeHTML and safeMarkdownToHTML functions to ensure that rendered HTML and Markdown content is safe from XSS vulnerabilities. - Updated the rendering logic for Excel and Markdown to sanitize the output, improving overall security in document previews.
This commit is contained in:
@@ -189,10 +189,6 @@ const renderToken = (token) => {
|
||||
}
|
||||
};
|
||||
|
||||
const myMarkdown = (res) => {
|
||||
return marked.parse(res, { renderer })
|
||||
}
|
||||
|
||||
// 获取实际内容
|
||||
const getActualContent = () => {
|
||||
return (props.content || props.session?.content || '').trim();
|
||||
|
||||
Reference in New Issue
Block a user