From: mkanat%bugzilla.org <> Date: Fri, 8 Feb 2008 02:14:42 +0000 (+0000) Subject: Bug 415539: Remove trailing whitespaces from bugmail X-Git-Tag: bugzilla-3.1.3~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f0e11b9bbe5b880c488b214a45755792646f0b3;p=thirdparty%2Fbugzilla.git Bug 415539: Remove trailing whitespaces from bugmail Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 85393a74e8..13f25b5b43 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -86,7 +86,11 @@ sub multiline_sprintf { # Make any single undef item into '' @line = map { defined $_ ? $_ : '' } @line; # And append a formatted line - $formatted .= sprintf("$format\n", @line); + $formatted .= sprintf($format, @line); + # Remove trailing spaces, or they become lots of =20's in + # quoted-printable emails. + $formatted =~ s/\s+$//; + $formatted .= "\n"; } return $formatted; }