linkedin/dustjs — pull request #378 by jimmyhchan (2013-12-09 22:56:13+00:00)
Title: #300 escape all values going into compile Dust code to allow for //

Buffers, raw, literal, references etc were only going through JSON.stringify.
They should be js escaped instead. Dust's jsescape escapes slahes and other stuff.

Issue #300 would affect places were literals, buffers or raw are used, but buffers are the most to be a problem.

for a template:
```
// inline comments
```

we want the compiled template to write
```
chk.write("\/\/ inline comments")
```

similarly there are cases where you'll have

```
{#section param="//comment?"}
{/section}
```

```
{>"//comment"}
```

```
{`
raw blocks of code
with // comment
`}
```