Skip to content

Commit

Permalink
Fixed spaces affecting quote removal
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2556 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
David Olivier committed Mar 11, 2007
1 parent 29b6813 commit 9717189
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9717189

Please sign in to comment.