]> 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:31:22 +0000 (03:31 +0000)
committerlpsolit%gmail.com <>
Wed, 14 May 2008 03:31:22 +0000 (03:31 +0000)
email_in.pl

index 576aed81ac2d44e438b4c22a7a07ffe11529853a..29725af63d79007ce9121d644db085b4d33bcd68 100644 (file)
@@ -330,6 +330,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;
 }
 
@@ -355,7 +357,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;