Skip to content

Commit

Permalink
Excel export could lead to execute apps #1433
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Jun 8, 2023
1 parent 54e2881 commit 3ad58f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adm_program/system/classes/ListConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ public function convertColumnContentForOutput(int $columnNumber, string $format,

// format value for csv export
if ($format === 'csv') {
$outputContent = $content;
$content = preg_replace("/\t/", "\\t", $content);
$content = preg_replace("/\r?\n/", "\\n", $content);
$outputContent = preg_replace("/^[@=+-]/", "#", $content);
}
// pdf should show only text and not much html content
elseif ($format === 'pdf') {
Expand Down

0 comments on commit 3ad58f1

Please sign in to comment.