MCPcopy Create free account
hub / github.com/cosscom/coss / markdownToSafeHTML

Function markdownToSafeHTML

apps/examples/calcom/lib/markdown-to-safe-html.ts:6–10  ·  view source on GitHub ↗
(markdown: string | null)

Source from the content-addressed store, hash-verified

4marked.use({ async: false });
5
6export function markdownToSafeHTML(markdown: string | null) {
7 if (!markdown) return "";
8 const parsedMd = marked.parse(markdown) as string;
9 return DOMPurify.sanitize(parsedMd);
10}

Callers 1

AppCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected