# autoescape

> Change how output is escaped for a section.

`autoescape` changes how output is [escaped](https://kilnlang.com/docs/language/escaping/) inside a section.

page.kiln:

```kiln
<script>
{% autoescape "js" %}
	const title = "{{ page.title }}";
{% endautoescape %}
</script>
```

Output:

```html
<script>
const title = "Tom\u0027s\u0020\u0022best\u0022\u0020page";
</script>
```

The strategy is a string: `"html"`, `"attr"`, `"js"`, `"css"` or `"url"`.

## Turning escaping off

`autoescape false` outputs values as they are. Only use it for content you fully trust.

```kiln
{% autoescape false %}
	{{ trustedHtml }}
{% endautoescape %}
```

For a single value, the `raw` filter is usually clearer.
