extra Text area preserve line brakes, stuck?

Hello



I have 2 extra text areas on the product pages.: one to type text and another one to show what you typed after you press save button. It works fine, but if client press enter and goes to the next line in the result textarea evrything is merged in one line…



I added “n” replace code to the JS save function. But it does not work.

var specs_text = $('#specs_text_' + prod_id).val();
specs_text = specs_text.replace(/\n/g, '
');






Any hint?