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