diff --git a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm b/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm index 9a1b2a8a258..ec4bf30dae5 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm @@ -352,7 +352,7 @@ sub Send { if ($deptext) { my $diffpart = {}; - $diffpart->{'text'} = "\n" . trim("\n\n" . $deptext); + $diffpart->{'text'} = "\n" . trim($deptext); push(@diffparts, $diffpart); } } @@ -595,6 +595,8 @@ sub sendMail { } my $diffs = $difftext; + # Remove extra newlines. + $diffs =~ s/^\n+//s; $diffs =~ s/\n+$//s; if ($isnew) { my $head = ""; foreach my $f (@headerlist) { diff --git a/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl b/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl index 494c12060f0..b90c15b1d2a 100644 --- a/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/email/newchangedmail.txt.tmpl @@ -41,8 +41,10 @@ X-Bugzilla-Changed-Fields: [% changedfields %] [%+ threadingmarker %] [%+ urlbase %]show_bug.cgi?id=[% bugid %] +[%- IF diffs %] [%+ diffs %] +[% END -%] [% FOREACH comment = new_comments %] --- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] ---