Skip to content

View Helpers

h()

h() — returns string

Available in: controller Category: Sanitization Functions

Encodes a value for safe HTML output. Use in templates to prevent XSS: #h(user.name)# instead of #user.name#.

NameTypeRequiredDefaultDescription
valueanyyesThe value to encode for HTML output. Converted to string if not already.