MCPcopy Create free account
hub / github.com/F12FLASH/CTF / escapeHtml

Function escapeHtml

7.GraphQL Apocalypse/client/src/components/code-editor.tsx:28–32  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

26 };
27
28 const escapeHtml = (text: string) => {
29 const div = document.createElement('div');
30 div.textContent = text;
31 return div.innerHTML;
32 };
33
34 const highlightSyntax = (code: string) => {
35 const escaped = escapeHtml(code);

Callers 1

highlightSyntaxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected