aboutsummaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorterry%netscape.com <>1999-04-22 00:45:22 +0000
committerterry%netscape.com <>1999-04-22 00:45:22 +0000
commitca0361863e6e8f8328f068b9ef25b4d55a5f841b (patch)
treed4f30a1ecf798929aabb716631469b5d3d168b8e /post_bug.cgi
parenta044ffe98211c1acd1001703bda869b73c93271e (diff)
downloadbugs-ca0361863e6e8f8328f068b9ef25b4d55a5f841b.tar
bugs-ca0361863e6e8f8328f068b9ef25b4d55a5f841b.tar.gz
bugs-ca0361863e6e8f8328f068b9ef25b4d55a5f841b.tar.bz2
bugs-ca0361863e6e8f8328f068b9ef25b4d55a5f841b.tar.xz
bugs-ca0361863e6e8f8328f068b9ef25b4d55a5f841b.zip
Fixed a bug where the long descriptions of bugs had a variety of
newline characters at the end, depending on the operating system of the browser that submitted the text.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi7
1 files changed, 6 insertions, 1 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 1cff52326..c0102fdbf 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -105,7 +105,12 @@ foreach my $field (@bug_fields) {
$query .= SqlQuote($::FORM{$field}) . ",\n";
}
-$query .= "now(), " . SqlQuote($::FORM{'comment'}) . " )\n";
+my $comment = $::FORM{'comment'};
+$comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
+$comment =~ s/\r/\n/g; # Get rid of mac-style line endings.
+$comment = trim($comment);
+
+$query .= "now(), " . SqlQuote($comment) . " )\n";
my %ccids;