summaryrefslogtreecommitdiffstats
path: root/doeditparams.cgi
diff options
context:
space:
mode:
authordave%intrec.com <>2000-09-29 14:29:09 +0200
committerdave%intrec.com <>2000-09-29 14:29:09 +0200
commit4c3068ee06914665fc630d2fa7a8215e6bc60eaf (patch)
treec4a61477a639c948bb54317f8cf53d19741b0390 /doeditparams.cgi
parent568b941f795464c614cbeffc0685ae2cb8592147 (diff)
downloadbugzilla-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar.gz
bugzilla-4c3068ee06914665fc630d2fa7a8215e6bc60eaf.tar.xz
Fix for bug 44076: Editparams falsely detecting text field changes and
NS4Mac putting a single linefeed in empty fields.
Diffstat (limited to 'doeditparams.cgi')
-rwxr-xr-xdoeditparams.cgi5
1 files changed, 4 insertions, 1 deletions
diff --git a/doeditparams.cgi b/doeditparams.cgi
index cc7b66107..148946fef 100755
--- a/doeditparams.cgi
+++ b/doeditparams.cgi
@@ -51,7 +51,8 @@ foreach my $i (@::param_list) {
if (exists $::FORM{"reset-$i"}) {
$::FORM{$i} = $::param_default{$i};
}
- $::FORM{$i} =~ s/\r\n/\n/; # Get rid of windows-style line endings.
+ $::FORM{$i} =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
+ $::FORM{$i} =~ s/^\n$//; # assume single linefeed is an empty string
if ($::FORM{$i} ne Param($i)) {
if (defined $::param_checker{$i}) {
my $ref = $::param_checker{$i};
@@ -64,6 +65,8 @@ foreach my $i (@::param_list) {
}
}
print "Changed $i.<br>\n";
+# print "Old: '" . url_quote(Param($i)) . "'<BR>\n";
+# print "New: '" . url_quote($::FORM{$i}) . "'<BR>\n";
$::param{$i} = $::FORM{$i}
}
}