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:
Saophalkun Ponlu 2008-08-18 00:41:38 +00:00
parent 75ae9859ae
commit ffb5d82bc2

View File

@ -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 {