Contao Summit 2026 in Leipzig 15th and 16th October

Twig Filters

  • csp_inline_styles

    Extracts all inline CSS style attributes of a given HTML string and automatically adds CSP hashes.

  • csp_unsafe_inline_style

    Adds a CSP hash for a given inline style.

  • deserialize

    Unserializes data from a serialized string.

  • encode_email

    Encodes an email address with HTML entities.

  • escape

    The escape filter escapes a string using strategies that depend on the context.

  • format_bytes

    Converts bytes to a human readable format.

  • highlight

    Syntax highlighting via highlight.php.

  • highlight_auto

    Automatic syntax highlighting via highlight.php.

  • insert_tag

    Replace insert tags for usage in text (non-HTML) output.

  • insert_tag_raw

    Replace insert tags for usage in HTML.

  • sanitize_html

    Sanitizes HTML code using a pre-configured Symfony sanitizer.