Skip to content

escape

Category: String

Escapes special characters in the input string for the specified format

  • Return type: string
  • Parameters:
    • format string — Escape format (‘html’, ‘json’, ‘xml’)
'<tag>'.escape('html')
'"text"'.escape('json')