MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / sanitize

Function sanitize

web/src/server/free-session/abuse-review.ts:171–173  ·  view source on GitHub ↗

* Strip characters that could be used to break out of the block * or inject bogus tags the model might follow. We're not trying to be * watertight (the model's system prompt is the primary defence), but * blocking the obvious cases is cheap.

(value: string)

Source from the content-addressed store, hash-verified

169 * blocking the obvious cases is cheap.
170 */
171function sanitize(value: string): string {
172 return value.replace(/[<>]/g, '').replace(/\r?\n/g, ' ').slice(0, 200)
173}

Callers 1

reviewSuspectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected