Skip to content
Snippets Groups Projects
Unverified Commit 64c87314 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #16249 from eileenmcnaughton/ex_exclosed

[REF] Remove enclosed & escaped variables
parents 8d5c32fd 6260bb0f
Branches
Tags
No related merge requests found
......@@ -40,13 +40,11 @@ class CRM_Core_Report_Excel {
$config = CRM_Core_Config::singleton();
$seperator = $config->fieldSeparator;
$enclosed = '"';
$escaped = $enclosed;
$add_character = "\015\012";
$schema_insert = '';
foreach ($header as $field) {
$schema_insert .= $enclosed . str_replace($enclosed, $escaped . $enclosed, stripslashes($field)) . $enclosed;
$schema_insert .= '"' . str_replace('"', '""', stripslashes($field)) . '"';
$schema_insert .= $seperator;
}
// end while
......@@ -88,7 +86,7 @@ class CRM_Core_Report_Excel {
$value = &$str;
}
$schema_insert .= $enclosed . str_replace($enclosed, $escaped . $enclosed, $value) . $enclosed;
$schema_insert .= '"' . str_replace('"', '""', $value) . '"';
}
if ($colNo < $fields_cnt - 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment