diff --git a/src/Component/CsvExport.php b/src/Component/CsvExport.php index 0959160..d173640 100644 --- a/src/Component/CsvExport.php +++ b/src/Component/CsvExport.php @@ -154,7 +154,12 @@ protected function renderCsv() protected function escapeString($str) { - return str_replace('"', '\'', strip_tags(html_entity_decode($str))); + $str = html_entity_decode($str); + $str = strip_tags($str); + $str = str_replace('"', '\'', $str); + $str = preg_replace('/\s+/', ' ', $str); + $str = trim($str); + return $str; } /**