> ## Documentation Index
> Fetch the complete documentation index at: https://reportana.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# escape

### Introduction

The `escape` filter is used to convert special characters in a string to their equivalent text entities. This is useful to ensure that the content displayed in text messages is safe and properly formatted without interpreting special characters.

### Example of Use

Example of how to use the `escape` filter to ensure special characters in a string are displayed correctly:

```twig theme={null}
{{ '<p>Hello, this is a <em>test</em> message</p>'|escape }}
```

### Output Example of the Code

<img src="https://mintcdn.com/reportana/9HogJxt6BTsd31jh/escape-en.png?fit=max&auto=format&n=9HogJxt6BTsd31jh&q=85&s=56b23165b8b523e0fcba5d02e9453742" alt="Result of the `escape` Filter" width="524" height="53" data-path="escape-en.png" />
