]> git.donarmstrong.com Git - debbugs.git/commitdiff
remove leading and trailing spaces in references and replyto don/reply_links
authorDon Armstrong <don@donarmstrong.com>
Wed, 30 Jul 2014 21:10:46 +0000 (14:10 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 30 Jul 2014 21:10:46 +0000 (14:10 -0700)
Debbugs/Mail.pm

index a2a27d237ae819937fbf187964c4939d33f45096..caae6ca8c4b86a86fad09ff4489e73dd885eb897 100644 (file)
@@ -435,8 +435,10 @@ sub reply_headers{
     $r_l{subject} = 'Re: '. $r_l{subject} unless $r_l{subject} =~ /(?:^|\s)Re:\s+/;
     $r_l{subject} =~ s/(?:^\s*|\s*$)//g;
     $r_l{'In-Reply-To'} = $head->get('Message-Id');
+    $r_l{'In-Reply-To'} =~ s/(?:^\s*|\s*$)//g if defined $r_l{'In-Reply-To'};
     delete $r_l{'In-Reply-To'} unless defined $r_l{'In-Reply-To'};
     $r_l{References} = ($head->get('References')//''). ' '.($head->get('Message-Id')//'');
+    $r_l{References} =~ s/(?:^\s*|\s*$)//g;
     my $date = $head->get('Date') // 'some date';
     $date =~ s/(?:^\s*|\s*$)//g;
     my $who = $head->get('From') // $head->get('Reply-To') // 'someone';