janl/mustache.js — Issue #156: Carriage return causes trouble
Author: wlievens
Created: 2012-01-23 11:09:30+00:00
State: open

I did the following:

1) pull in a file contain a mustache template from the server
2) this file was created in windows, so it contains \r\n newlines
3) render the template with Mustache

I got an error to the tune of "unterminated string".
When looking at the Mustache-generated javascript, I saw indeed that it contained things like
send("

");

Which is invalid JS. Turns out it didn't strip the \r characters when line splitting!