If a template includes the U+2028 ([line separator](http://www.fileformat.info/info/unicode/char/2028/index.htm)) character, JavaScriptCompiler.compile() will fail. Here's a fiddle that shows the problem: http://jsfiddle.net/9vYCX/ To fix this, a bunch of nasty unicode characters could be escaped prior to parsing using a [regex not unlike Douglas Crockford's from json2.js](https://github.com/douglascrockford/JSON-js/blob/master/json2.js#L195). Here's a fiddle with "the fix" http://jsfiddle.net/9vYCX/1/
If a template includes the U+2028 (line separator) character, JavaScriptCompiler.compile() will fail.
Here's a fiddle that shows the problem: http://jsfiddle.net/9vYCX/
To fix this, a bunch of nasty unicode characters could be escaped prior to parsing using a regex not unlike Douglas Crockford's from json2.js.
Here's a fiddle with "the fix" http://jsfiddle.net/9vYCX/1/