diff options
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 7 |
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; |