- Fixed bug #1053, where ' characters were not escaped by export-csv.pl (thanks
  to John Florian).
This commit is contained in:
Paul Beckingham
2012-12-22 18:38:46 -05:00
parent 9b63fd6068
commit eeb4cf3dd8
2 changed files with 6 additions and 1 deletions

View File

@@ -53,6 +53,9 @@ for my $task (split /,$/ms, qx{$command})
{
my $data = from_json ($task);
my $desc = $data->{'description'};
$desc =~ s/'/\\'/g;
print "'$data->{'uuid'}',",
"'$data->{'status'}',",
"'", (exists $data->{'tags'} ? join (' ', @{$data->{'tags'}}) : ''), "',",
@@ -65,7 +68,7 @@ for my $task (split /,$/ms, qx{$command})
"'", ($data->{'priority'} || ''), "',",
"'", ($data->{'fg'} || ''), "',",
"'", ($data->{'bg'} || ''), "',",
"'$data->{'description'}'",
"'$desc'",
"\n";
# Note that this format ignores: