Skip to content

Kirby 3.5.7.1

Escape

The Escape class provides methods for escaping common HTML attributes data. This can be used to put untrusted data into typical attribute values like width, name, value, etc.

The Escape class is a wrapper for Laminas Escaper.

The methods of this class should not be used for complex attributes like href, src, style, or any of the event handlers like onmouseover. Use esc($string, 'js') for event handler attributes, esc($string, 'url') for src attributes and esc($string, 'css') for style attributes.