diff --git a/common.php b/common.php index 3ef4455fbba..a870cc83108 100644 --- a/common.php +++ b/common.php @@ -3053,8 +3053,11 @@ function CSVUnquote($field) // This function removes surrounding and masking quotes from the CSV field // c_schmitz { - $field=substr($field,1,strlen($field)-2); + print $field.":"; + $field = preg_replace ("/^\040*\"/", "", $field); + $field = preg_replace ("/\"\040*$/", "", $field); $field=str_replace('""','"',$field); + print $field."\n"; return $field; }