From: bugreport%peshkin.net <> Date: Sun, 10 Nov 2002 14:40:05 +0000 (+0000) Subject: Bug 179264 csv output for the buglist (see url inside) is invalid (too many "s) X-Git-Tag: bugzilla-2.17.2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8109434862e948a3aabc30ce0d4672daee1e0866;p=thirdparty%2Fbugzilla.git Bug 179264 csv output for the buglist (see url inside) is invalid (too many "s) r,a=justdave --- diff --git a/globals.pl b/globals.pl index bee0ed9ff2..170ec8c41e 100644 --- a/globals.pl +++ b/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; } , } ,