Skip to content

U+2028 character in template breaks the compiler #375

Closed
@sidonath

Description

@sidonath

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions