MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / escapeSlackText

Function escapeSlackText

server/src/utils/slack-escape.ts:14–20  ·  view source on GitHub ↗
(raw: string, maxLength = 240)

Source from the content-addressed store, hash-verified

12 * (e.g. `<` → `&lt;` is a 4x expansion).
13 */
14export function escapeSlackText(raw: string, maxLength = 240): string {
15 const truncated = raw.length > maxLength ? `${raw.slice(0, maxLength)}…` : raw;
16 return truncated
17 .replace(/&/g, '&amp;')
18 .replace(/</g, '&lt;')
19 .replace(/>/g, '&gt;');
20}

Callers 2

notifyPendingReviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected