I have two files. First file is a form and the second file displays result.
First file:
I know its late but may help others.
use this in when document indentation is required.
$('document').ready(function() { $('textarea').each(function(){ $(this).val($(this).val().trim()); } ); });