mirror of https://github.com/MISP/MISP
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
parent
d5db222795
commit
34f15268d2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue