passbe/beef-migration-test-2 — Issue #169: Add a function to ERB to correctly format multi-line strings in javascript
Author: passbe
Created: 2011-12-05 09:03:36+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");

Original link: http://code.google.com/p/beef/issues/detail?id=44