beefproject/beef — Issue #174: Add a function to ERB to correctly format multi-line strings in javascript
Author: passbe
Created: 2011-12-10 21:52:19+00:00
State: open

alert("<%== @text %>");

produces:

alert("test
test
test");

Replace with something like:

alert("<%== format_multiline @text %>");

to get:

alert("test\ntest\ntest");
Google Code Issue: http://code.google.com/p/beef/issues/detail?id=44