mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
Fix escaping of double quotes
This commit is contained in:
parent
f595a3f334
commit
5379529398
@ -1172,13 +1172,9 @@ class nextmatch_widget
|
||||
}
|
||||
$value = implode(', ',$value);
|
||||
|
||||
if (strpos($value,'"') !== false)
|
||||
{
|
||||
$value = '"'.str_replace('"', '""', $value).'"'; // Escape double quotes
|
||||
}
|
||||
if (strpos($value,$separator) !== false || strpos($value,"\n") !== false || strpos($value,"\r") !== false)
|
||||
{
|
||||
$value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"';
|
||||
$value = '"'.str_replace(array('\\', '"',),array('\\\\','""'),$value).'"';
|
||||
$value = str_replace("\r\n", "\n", $value); // to avoid early linebreak by Excel
|
||||
}
|
||||
$out[] = $value;
|
||||
|
Loading…
Reference in New Issue
Block a user