summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-09-25 16:11:32 +0200
committergerv%gerv.net <>2002-09-25 16:11:32 +0200
commitaaf6ccb9866059edabb6607d435e2c320afcf611 (patch)
tree2d512b5e7c627ba70043e501c512a8f52e97d307 /globals.pl
parentbe7edaf914d0ddfbd4c863ea2d1f0101491fe611 (diff)
downloadbugzilla-aaf6ccb9866059edabb6607d435e2c320afcf611.tar.gz
bugzilla-aaf6ccb9866059edabb6607d435e2c320afcf611.tar.xz
Bug 12282 - General summary reports. Patch by gerv; r=joel.
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/globals.pl b/globals.pl
index 242c8a5f6..64031bc85 100644
--- a/globals.pl
+++ b/globals.pl
@@ -1564,6 +1564,18 @@ $::template ||= Template->new(
# filter should be used for a full URL that may have
# characters that need encoding.
url_quote => \&url_quote ,
+
+ # In CSV, quotes are doubled, and any value containing a quote or a
+ # comma is enclosed in quotes.
+ csv => sub
+ {
+ my ($var) = @_;
+ $var =~ s/"/""/;
+ if ($var =~ /",/) {
+ $var = "\"$var\"";
+ }
+ return $var;
+ } ,
} ,
}
) || die("Template creation failed: " . Template->error());