Files
openclaw/ui/package.json
Val Alexander 9315302516 fix(ui): replace marked.js with markdown-it to fix ReDoS UI freeze (#46707) thanks @zhangfnf
Replace marked.js with markdown-it for the control UI chat markdown renderer
to eliminate a ReDoS vulnerability that could freeze the browser tab.

- Configure markdown-it with custom renderers matching marked.js output
- Add GFM www-autolink with trailing punctuation stripping per spec
- Escape raw HTML via html_block/html_inline overrides
- Flatten remote images to alt text, preserve base64 data URI images
- Add task list support via markdown-it-task-lists plugin
- Trim trailing CJK characters from auto-linked URLs (RFC 3986)
- Keep marked dependency for agents-panels-status-files.ts usage

Co-authored-by: zhangfan49 <zhangfan49@baidu.com>
Co-authored-by: Nova <nova@openknot.ai>
2026-04-13 16:08:35 -05:00

29 lines
667 B
JSON

{
"name": "openclaw-control-ui",
"private": true,
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite",
"preview": "vite preview",
"test": "vitest run --config vitest.config.ts"
},
"dependencies": {
"@create-markdown/preview": "^2.0.3",
"@noble/ed25519": "3.0.1",
"dompurify": "^3.3.3",
"lit": "^3.3.2",
"markdown-it": "^14.1.1",
"markdown-it-task-lists": "^2.1.1",
"marked": "^18.0.0"
},
"devDependencies": {
"@types/markdown-it": "^14.1.2",
"@vitest/browser-playwright": "4.1.4",
"jsdom": "^29.0.2",
"playwright": "^1.59.1",
"vite": "8.0.8",
"vitest": "4.1.4"
}
}