If I have a textarea block like so...
textarea
.. text area content ... &
Here is the answer.
Use this function.
function br2nl(varTest) { return varTest.replace(//ig, "\r"); }