MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / escapeHTML

Function escapeHTML

shared/common-utils.ts:78–80  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

76const EscapeRE = new RegExp(`(?:${Object.keys(EscapeMap).join('|')})`, 'g');
77
78export function escapeHTML(text: string) {
79 return text.replace(EscapeRE, str => EscapeMap[str as keyof typeof EscapeMap]);
80}
81
82function splitIntoChunks(s: string, chunkSize: number): string[] {
83 const chunks: string[] = [];

Callers 15

handleUrlFunction · 0.85
selectGroupMethod · 0.85
sendPrintDataMethod · 0.85
createSVGMethod · 0.85
updateTitleFunction · 0.85
sendPrintDataFunction · 0.85
updateTitleMethod · 0.85
updateTitleMethod · 0.85
getExtraPrintDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected