summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-10-06 17:52:33 +0200
committerDavid Lawrence <dkl@mozilla.com>2014-10-06 17:52:33 +0200
commitaafa79dbed67514aede45f884572c30934854107 (patch)
treedef39520441fdc097877f222a32cc86e5e6fda40 /Bugzilla/Template.pm
parentc034487bf62423265d0832197e0ff490f82330eb (diff)
parent3e1e67bed36bbe454c654f1e0a16ce73e724a5e0 (diff)
downloadbugzilla-aafa79dbed67514aede45f884572c30934854107.tar.gz
bugzilla-aafa79dbed67514aede45f884572c30934854107.tar.xz
merged with upstream 4.2
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 6a46701ff..9bd0c51bd 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -850,10 +850,12 @@ sub create {
},
# In CSV, quotes are doubled, and any value containing a quote or a
- # comma is enclosed in quotes.
+ # comma is enclosed in quotes. If a field starts with an equals
+ # sign, it is proceed by a space.
csv => sub
{
my ($var) = @_;
+ $var = ' ' . $var if substr($var, 0, 1) eq '=';
$var =~ s/\"/\"\"/g;
if ($var !~ /^-?(\d+\.)?\d*$/) {
$var = "\"$var\"";