From 110f6e5b40b84560702f1b88e43a39c02339dee6 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" Date: Sun, 10 Nov 2002 06:40:05 +0000 Subject: [PATCH] Bug 179264 csv output for the buglist (see url inside) is invalid (too many "s) r,a=justdave --- webtools/bugzilla/globals.pl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webtools/bugzilla/globals.pl b/webtools/bugzilla/globals.pl index bee0ed9ff261..170ec8c41eb1 100644 --- a/webtools/bugzilla/globals.pl +++ b/webtools/bugzilla/globals.pl @@ -1586,15 +1586,12 @@ $::template ||= Template->new( # characters that need encoding. url_quote => \&Bugzilla::Util::url_quote, - # In CSV, quotes are doubled, and any value containing a quote or a - # comma is enclosed in quotes. + # In CSV, quotes are doubled, and we enclose the whole value in quotes csv => sub { my ($var) = @_; - $var =~ s/"/""/; - if ($var =~ /",/) { - $var = "\"$var\""; - } + $var =~ s/"/""/g; + $var = "\"$var\""; return $var; } , } ,