Commit ca036186 authored by terry%netscape.com's avatar terry%netscape.com

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.
parent a044ffe9
......@@ -78,7 +78,13 @@ sub FetchOneColumn {
sub AppendComment {
my ($bugid,$who,$comment) = (@_);
$comment =~ s/\r\n/\n/; # Get rid of windows-style line endings.
open(DEBUG, ">/tmp/debug");
print DEBUG "A $comment";
$comment =~ s/\r\n/\n/g; # Get rid of windows-style line endings.
print DEBUG "B $comment";
$comment =~ s/\r/\n/g; # Get rid of mac-style line endings.
print DEBUG "C $comment";
close DEBUG;
if ($comment =~ /^\s*$/) { # Nothin' but whitespace.
return;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment