mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 05:30:43 +00:00
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>
11 lines
289 B
TypeScript
11 lines
289 B
TypeScript
declare module "markdown-it-task-lists" {
|
|
import type MarkdownIt from "markdown-it";
|
|
interface TaskListsOptions {
|
|
enabled?: boolean;
|
|
label?: boolean;
|
|
labelAfter?: boolean;
|
|
}
|
|
const plugin: (md: MarkdownIt, options?: TaskListsOptions) => void;
|
|
export default plugin;
|
|
}
|