From 97171898e52c6b84e65156e90e64ed6932b703e3 Mon Sep 17 00:00:00 2001 From: David Olivier Date: Sun, 11 Mar 2007 22:17:33 +0000 Subject: [PATCH] Fixed spaces affecting quote removal git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2556 b72ed6b6-b9f8-46b5-92b4-906544132732 --- common.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }