From a9e2e9eb943abb46aeaa72f1e98fa2e8e070f177 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Thu, 7 Feb 2008 20:14:42 +0000 Subject: [PATCH] Bug 415539: Remove trailing whitespaces from bugmail Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit git-svn-id: svn://10.0.0.236/trunk@245164 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/BugMail.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm b/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm index 85393a74e89..13f25b5b43c 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm +++ b/mozilla/webtools/bugzilla/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; }