MCPcopy Create free account
hub / github.com/markmap/markmap / escapeHtml

Function escapeHtml

packages/markmap-common/src/html.ts:9–11  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

7};
8
9export function escapeHtml(html: string): string {
10 return html.replace(/[&<"]/g, (m) => escapeChars[m]);
11}
12
13export function escapeScript(content: string): string {
14 return content.replace(/<(\/script>)/g, '\\x3c$2');

Callers 1

htmlOpenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected