MCPcopy Create free account
hub / github.com/pollinations/pollinations / sanitizeString

Function sanitizeString

gen.pollinations.ai/src/image/util.ts:6–10  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

4
5// Strip control characters while preserving valid Unicode characters.
6export function sanitizeString(str: string) {
7 if (!str) return str;
8 // biome-ignore lint/suspicious: this is ok
9 return str.replace(/[\u0000-\u001F\u007F-\u009F]/g, "");
10}

Callers 5

generateImageResultFunction · 0.90
callSelfHostedServerFunction · 0.90
callGPTImageWithEndpointFunction · 0.90
callAzureFluxKontextFunction · 0.90

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected