diff --git a/app/helpers/template.php b/app/helpers/template.php index 9eb76a6..389e501 100644 --- a/app/helpers/template.php +++ b/app/helpers/template.php @@ -332,8 +332,8 @@ function updateDom($tag, $dom){ } function trimWhitespace( $string ){ - // replace multiple spaces with one - return preg_replace( '/\s+/', ' ', $string ); + // replace multiple spaces with one (except textarea) + return preg_replace( '/(?:\s+(?![^<]*<\/textarea>))/', ' ', $string ); } }