]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 431704: Remove useless newlines in replies sent by email_in.pl - Patch by FrÃ...
authorlpsolit%gmail.com <>
Wed, 14 May 2008 03:28:12 +0000 (03:28 +0000)
committerlpsolit%gmail.com <>
Wed, 14 May 2008 03:28:12 +0000 (03:28 +0000)
email_in.pl

index 81637ebc4975b5f243ca4abeed955455f54a3ff6..12be24471d7325c42e21b6a7bc837459d77dab91 100644 (file)
@@ -287,6 +287,8 @@ sub html_strip {
     $var =~ s/\&gt;/>/g;
     $var =~ s/\&quot;/\"/g;
     $var =~ s/&#64;/@/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;