MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / escapeHtml

Function escapeHtml

src/artifacts/preview.ts:56–58  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

54}
55
56function escapeHtml(s: string): string {
57 return s.replace(/[&<>]/g, c => (c === '&' ? '&amp;' : c === '<' ? '&lt;' : '&gt;'));
58}
59
60/**
61 * Strip ES module syntax so source can run inside an in-browser `<script type="text/babel">`

Callers 2

markdownHarnessFunction · 0.70
buildPreviewHtmlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected