mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
replaced <br /> with newline for CSV export
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60907 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
75ae9859ae
commit
ffb5d82bc2
@ -904,6 +904,8 @@ JS
|
||||
foreach($fieldItems as $fieldItem) {
|
||||
$fields = $fieldItem->Fields();
|
||||
foreach($fields as $field) {
|
||||
// replace <br/ > with newline for csv
|
||||
$field->Value = str_replace('<br />', "\n", $field->Value);
|
||||
$fileData .= "\"" . $field->Value . "\"";
|
||||
if($field->Last()) {
|
||||
$fileData .= "\n";
|
||||
@ -911,6 +913,7 @@ JS
|
||||
$fileData .= $this->csvSeparator;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
HTTP::sendFileToBrowser($fileData, $fileName);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user