Escape or unescape a string for safe use in HTML, XML, CSV, SQL, shell commands, or regular expressions.
| Field | Type | Required | Description |
|---|
input | string | Yes | String to escape or unescape |
context | string | Yes | html, xml, csv, sql, shell, regex |
action | string | Yes | escape or unescape |
| Field | Type | Description |
|---|
output | string | Escaped or unescaped result |
context | string | Context used |
action | string | Action performed |
curl -X POST https://morso.dev/api/escape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "<script>alert(\"xss\")</script>", "context": "html", "action": "escape"}'
"output": "<script>alert("xss")</script>",
curl -X POST https://morso.dev/api/escape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "hello; rm -rf /", "context": "shell", "action": "escape"}'
"output": "'hello; rm -rf /'",
curl -X POST https://morso.dev/api/escape \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "it''s a test", "context": "sql", "action": "unescape"}'