Bug 179264 csv output for the buglist (see url inside) is invalid (too many "s)

r,a=justdave
This commit is contained in:
bugreport%peshkin.net 2002-11-10 06:40:05 +00:00
Родитель 5ddfe8e6e4
Коммит 5c9b2cefb1
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -1586,15 +1586,12 @@ $::template ||= Template->new(
# characters that need encoding. # characters that need encoding.
url_quote => \&Bugzilla::Util::url_quote, url_quote => \&Bugzilla::Util::url_quote,
# In CSV, quotes are doubled, and any value containing a quote or a # In CSV, quotes are doubled, and we enclose the whole value in quotes
# comma is enclosed in quotes.
csv => sub csv => sub
{ {
my ($var) = @_; my ($var) = @_;
$var =~ s/"/""/; $var =~ s/"/""/g;
if ($var =~ /",/) {
$var = "\"$var\""; $var = "\"$var\"";
}
return $var; return $var;
} , } ,
} , } ,