Reference

Xml::encode()

Converts a string to a xml-safe string Converts it to html-safe first and then it will replace html entities to xml entities

Xml::encode(string $string = null, bool $html = true): string

Parameters

Name Type Default Description
$string string null
$html bool true

True: convert to html first

Return type

string

Source code

kirby/src/Toolkit/Xml.php#L144