mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Add CSV Escaping to the Sample Export CSV Files
This commit is contained in:
@@ -507,6 +507,8 @@ if (isset($_POST["import_locations_csv"])) {
|
||||
if(isset($_GET['download_locations_csv_template'])){
|
||||
|
||||
$delimiter = ",";
|
||||
$enclosure = '"';
|
||||
$escape = '\\';
|
||||
$filename = "Locations-Template.csv";
|
||||
|
||||
//create a file pointer
|
||||
@@ -514,7 +516,7 @@ if(isset($_GET['download_locations_csv_template'])){
|
||||
|
||||
//set column headers
|
||||
$fields = array('Name', 'Description', 'Address', 'City', 'State', 'Postal Code', 'Phone', 'Hours');
|
||||
fputcsv($f, $fields, $delimiter);
|
||||
fputcsv($f, $fields, $delimiter, $enclosure, $escape);
|
||||
|
||||
//move back to beginning of file
|
||||
fseek($f, 0);
|
||||
|
||||
Reference in New Issue
Block a user