mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Simplify $.escape
This commit is contained in:
@@ -325,14 +325,14 @@ await $.braces(`echo {1,2,3}`);
|
||||
// => ["echo 1", "echo 2", "echo 3"]
|
||||
```
|
||||
|
||||
### `$.raw` (unescaped strings)
|
||||
### `$.escape` (unescaped strings)
|
||||
|
||||
For security purposes, Bun Shell escapes input by default. If you need to disable that, this function returns a string that is not escaped by Bun Shell:
|
||||
|
||||
```js
|
||||
import { $ } from "bun";
|
||||
|
||||
await $`echo ${$.raw("Hello World!")}`;
|
||||
await $`echo ${$.escape("Hello World!")}`;
|
||||
// => Hello World!
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user