Skip to content

Commit 80abfa6

Browse files
committed
Better security in exported responses in excel
1 parent 299fe38 commit 80abfa6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/tools_export.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,10 @@ public function export_populate_currentrecord($richsubmission, &$recordtoexport)
546546
public function export_write_xlsrecord($row, $recordtoexport, &$worksheet) {
547547
$col = 0;
548548
foreach ($recordtoexport as $value) {
549-
if ($value == SURVEYPRO_EXPNULLVALUE) {
550-
$worksheet[0]->write_string($row, $col, $value);
549+
if (is_numeric($value)) {
550+
$worksheet[0]->write_number($row, $col, $value);
551551
} else {
552-
$worksheet[0]->write($row, $col, $value, '');
552+
$worksheet[0]->write_string($row, $col, $value);
553553
}
554554
$col++;
555555
}

0 commit comments

Comments
 (0)