ollym/parrot — Issue #3: Issue with using double quotes on sandboxed function params
Author: johnnypez
Created: 2011-10-10 08:00:44+00:00
State: open

I'm seeing this odd issue, hopefully someone can confirm it.

## A - This Fails

#### SyntaxError: Unexpected token ILLEGAL parrot/index.js:165

```javascript
var data = "<%= foo(\"bar\") %>";

var view = {
foo: function(str){ return x(str) }
}

parrot.render(data, {sandbox:view})
```

## B - This Works

```javascript
var data = "<%= foo('bar') %>";

var view = {
foo: function(str){ return x(str) }
}

parrot.render(data, {sandbox:view})
```

B works when I encapsulate the function param 'bar' with single quotes instead of double quotes.

Can anyone else reproduce this?