fix: export events csv with CR (fix #3458)

Export using automation functionnality for ids does not clean the special char like CRLF.
When there is a carriage return in the event info, the csv is broken.
pull/3460/head
kalyparker 2018-07-09 08:58:12 -07:00
parent d5db222795
commit 34f15268d2
1 changed files with 1 additions and 1 deletions

View File

@ -2555,7 +2555,7 @@ class EventsController extends AppController {
if ($includeContext) {
foreach ($this->Event->csv_event_context_fields_to_fetch as $header => $field) {
if ($field['object']) $line .= ',' . $attribute['Event'][$field['object']][$field['var']];
else $line .= ',' . $attribute['Event'][$field['var']];
else $line .= ',' . str_replace(array("\n","\t","\r")," ",$attribute['Event'][$field['var']]);
}
}
$final[] = $line;