twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

Properly escape \u2028 and \u2029. #185

Closed drwrf closed 10 years ago

drwrf commented 10 years ago

Javascript will treat these characters as new lines when parsing code which can result in a syntax error.

drwrf commented 10 years ago

Anyone available to look at this? @sayrer? @fat?

sayrer commented 10 years ago

Seems like a good patch--needs a test, though.

drwrf commented 10 years ago

@sayrer I'm on it.

drwrf commented 10 years ago

@sayrer Tests added. I can confirm the tests were failing before the patch as well.

drwrf commented 10 years ago

@sayrer Thanks for merging! When do you think we can cut a release? This is causing issues for us downstream.

sayrer commented 10 years ago

This is in v3.0.2