From dc57a4117a58ce2c6ef58c5ea37d6ebc6ebc9fd5 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 14 May 2008 03:28:12 +0000 Subject: Bug 431704: Remove useless newlines in replies sent by email_in.pl - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_in.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index 81637ebc4..12be24471 100644 --- a/email_in.pl +++ b/email_in.pl @@ -287,6 +287,8 @@ sub html_strip { $var =~ s/\>/>/g; $var =~ s/\"/\"/g; $var =~ s/@/@/g; + # Also remove undesired newlines and consecutive spaces. + $var =~ s/[\n\s]+/ /gms; return $var; } @@ -312,7 +314,7 @@ sub die_handler { my $reply = reply(to => $input_email, top_post => 1, body => "$msg\n"); MessageToMTA($reply->as_string); } - print STDERR $msg; + print STDERR "$msg\n"; # We exit with a successful value, because we don't want the MTA # to *also* send a failure notice. exit; -- cgit v1.2.3-24-g4f1b