string_escape
Escape text using conventions for JSON, JS, Python, shell, HTML, XML, and more. Specify style to encode special characters safely.
Instructions
Escape text for a source-code or markup context (JSON/JS/C/shell/HTML/...).
style picks the convention: json|js|python|c|backslash (backslash escapes),
html|xml (entities), unicode_escape (\uXXXX/\xNN), quoted_printable, or
mime_word (=?UTF-8?B?...?=). shell yields a paste-safe single-quoted token.
For URL %-escaping use encode(scheme='url') instead. Inverse: string_unescape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| style | Yes |