forked from extern/egroupware
Fix escaping of double quotes
This commit is contained in:
parent
b6b7e7bd84
commit
939052437d
@ -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