# Add Slashes

Modifies a string by adding backslashes before characters that need to be escaped. These characters are:

- single quote `'`
- double quote `"`
- backslash `\`

This is most often used when passing string data into JavaScript.

``` yaml
summary: >
  "I'm not listening!" said the small, strange creature.
```

::tabs

::tab antlers
```antlers
{{ summary | add_slashes }}
```

::tab blade
```blade
{{ Statamic::modify($summary)->addSlashes() }}
```
::

``` output
\"I\'m not listening!\" said the small, strange creature.
```
