escape column headings in CSV output
This commit is contained in:
@@ -588,7 +588,15 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
||||
foreach ($header_array as $column) {
|
||||
$maximums[] = count($data[$column]);
|
||||
//make the column headings a bit more user friendly
|
||||
$column_headings[] = $variety_sessions[$column]->booking_variety_descrip;
|
||||
$heading = $variety_sessions[$column]->booking_variety_descrip;
|
||||
//enclose $heading if necessary
|
||||
if ( $encloseAll || preg_match( "/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $heading ) ) {
|
||||
$column_headings[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $heading) . $enclosure;
|
||||
}
|
||||
else {
|
||||
$column_headings[] = $heading;
|
||||
}
|
||||
//$column_headings[] = $variety_sessions[$column]->booking_variety_descrip;
|
||||
}
|
||||
|
||||
//add the column headings to the CSV
|
||||
|
Reference in New Issue
Block a user