Skip to content

Kirby 4.2.0

Str::esc()

Escape string for context specific output

Str::esc(string $string, string $context = 'html'): string

Parameters

Name Type Default Description
$string * string Untrusted data
$context string 'html' Location of output (html, attr, js, css, url or xml)

Return type

string

Parent class

Kirby\Toolkit\Str