The sanitize option cleans HTML and Markdown in the OpenAPI description. Use it when the description comes from a source you do not trust.
| Option | Type | Description |
|---|---|---|
| sanitize | boolean | Remove unsafe HTML and Markdown to prevent cross-site scripting (XSS) attacks. Default: false. |
When set to true, Redoc treats the API description as untrusted. It removes any markup that could run a script.
redocly.yaml
openapi:
sanitize: true- OpenAPI configuration - All the options you can set under
openapi - OpenAPI Specification - The official standard for API descriptions
- OpenAPI visual reference - A visual map of every part of an OpenAPI description
- Configuration options - All the other options for your project