Redocly logo
  • Products
  • Build your docs with

    Reunite

    • RealmCombo of Redoc, Revel, and Reef
    • RevelExternal developer showcase
    • RedocAPI reference and mock server
    • ReefInternal service catalog
    • Respect MonitoringAPI monitoring
    • Open source tools:
      Redoc
      Redocly CLI
      Respect
  • Docs
  • Learn
  • Customers
  • Pricing
Search/
  • ← Back to Docs
  • Changelog
  • Reunite + Realm system overview
  • Get started
  • Reunite
  • Content management
  • Branding & navigation
  • Integrations and automations
  • Access management
  • Configuration options
    • analytics
    • apiFunctions
    • asyncapi
    • breadcrumbs
    • catalogClassic
    • codeSnippet
    • colorMode
    • developerOnboarding
    • env
    • feedback
    • footer
    • graphql
    • ignore
    • l10n
    • links
    • logo
    • markdown
    • metadata
    • metadataGlobs
    • mockServer
    • navbar
    • navigation
    • openapi
      • codeSamples
      • corsProxyUrl
      • downloadUrls
      • events
      • generatedSamplesMaxDepth
      • hideDownloadButtons
      • hideInfoMetadata
      • hidePropertiesPrefix
      • hideReplay
      • hideSchemaTitles
      • jsonSamplesExpandLevel
      • layout
      • maxDisplayedEnumValues
      • onlyRequiredInSamples
      • sanitize
      • schemaDefinitionsTagName
      • schemasExpansionLevel
      • showExtensions
      • sortRequiredPropsFirst
    • products
    • rbac
    • redirects
    • removeAttribution
    • requiresLogin
    • residency
    • responseHeaders
    • reunite
    • scorecard
    • scripts
    • search
    • seo
    • sidebar
    • sso
    • ssoDirect
    • userMenu
    • versionPicker
    • Front matter configuration options
Last updated 1 week ago

sanitize

The sanitize option enables HTML/Markdown sanitization for the OpenAPI description.

Options

OptionTypeDescription
sanitizebooleanSanitize HTML/Markdown to prevent cross-site scripting (XSS) attacks. Default value is false.

Examples

If set to true, the API description is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.

redocly.yaml
openapi:
  sanitize: true

Related options

  • openapi - Learn more about using openapi configuration.

Resources

  • OpenAPI Specification
  • OpenAPI visual reference

Was this helpful?

 
Next page
On this page
OptionsExamplesRelated optionsResources

Products

RedocRevelReefRealmReuniteRespect MonitoringRedocly CLIRespect

Explore

PricingProEnterpriseEnterprise PlusCustomersAbout UsCareersContact Sales

Resources

DocsBlogWebinarsWhy RedoclyDocs-like-code

Tech & legal

SecurityTech StackStatusTermsSLADPA

Contact us

GitHub iconLinkedIn iconX iconYouTube icon
Contact Us
© 2025 Redocly Inc. All rights reserved.
Built with 💙 ☕️️ and 🌮. This website runs entirely on Realm.