# escape\_check

Source: https://zotonic.com/docs/2272/escape_check

URI: https://zotonic.com/id/2272

Language: en



Ensures thant an HTML escaped value is properly escaped.

Checks for all reserved HTML characters if they are properly escaped.

Escaped strings are safe to be displayed in a HTML page. When you echo a query string argument or path variable then you must escape the value before displaying it on a HTML page.

The following characters are replaced:

| Character | Replacement |
| --------- | ----------- |
| `>`       | `&gt;`      |
| `<`       | `&lt;`      |
| `"`       | `&quot;`    |
| `'`       | `&#039;`    |
| `&`       | `&amp;`     |

If you always want escaping to be applied, use the <a href="/id/doc_template_filter_filter_force_escape" class="doc-reference doc-reference-filter"><code>filter#force_escape</code></a> filter.

For example:

```django
{{ value|escape_check }}
```

When the value is `<hel&amp;lo>` then the output is `&lt;hel&amp;lo&gt;`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2272?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2272?language=en>)
