Skip to content

Kirby 5.0.1

Html::encode()

Converts a string to an HTML-safe string

Html::encode(string|null $string, bool $keepTags = false): string

Parameters

Name Type Default Description
$string stringornull no default value
$keepTags bool false If true, existing tags won't be escaped

Return type

string

The HTML string

Parent class

Kirby\Toolkit\Html