]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fixed a bug where the long descriptions of bugs had a variety of
authorterry%netscape.com <>
Thu, 22 Apr 1999 00:45:22 +0000 (00:45 +0000)
committerterry%netscape.com <>
Thu, 22 Apr 1999 00:45:22 +0000 (00:45 +0000)
newline characters at the end, depending on the operating system of
the browser that submitted the text.

globals.pl
post_bug.cgi

index d6e18d225291d591cf639c76a0a96465ae415460..26539107bbf4a264fffab20c4fc8984bc6ee2506 100644 (file)
@@ -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;
     }
index 1cff52326971f62a05270939c220ad594598b4e1..c0102fdbf23602fba65b47b9e480a1500a8aeca2 100755 (executable)
@@ -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;