From eeb4cf3dd8779489985a3fb0c164a4494942634f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 22 Dec 2012 18:38:46 -0500 Subject: [PATCH] Bug #1053 - Fixed bug #1053, where ' characters were not escaped by export-csv.pl (thanks to John Florian). --- ChangeLog | 2 ++ scripts/add-ons/export-csv.pl | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d693239dd..6b21fec72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,6 +48,8 @@ Bugs provides an incorrect summary. + Fixed bug #1048, which segfaulted rather than complain about syntax (thanks to Bryce Harrington, Štěpán Henek). + + Fixed bug #1053, where ' characters were not escaped by export-csv.pl (thanks + to John Florian). + Fixed bug #1056, where CmdSummary did not print abstract parents. + Fixed bug #1059, where CmdEdit was running garbage collection. + Fixed bug #1060, where an error was not thrown correctly. diff --git a/scripts/add-ons/export-csv.pl b/scripts/add-ons/export-csv.pl index 899bac501..f1311c11f 100755 --- a/scripts/add-ons/export-csv.pl +++ b/scripts/add-ons/export-csv.pl @@ -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: