$_ = $hdr;
s/\n\s/ /g;
finish() if m/^x-loop: (\S+)$/i && $1 eq "$gMaintainerEmail";
- my $ins = !m/^subject:/i && !m/^reply-to:/i && !m/^return-path:/i
- && !m/^From / && !m/^X-Debbugs-/i;
+ my $ins = !m/^(?:(?:subject|reply-to|return-path|mail-followup-to):
+ |From\s|X-Debbugs-)/xi;
$fwd .= encode_utf8($hdr)."\n" if $ins;
# print {$debugfh} ">$_<\n";
if (s/^(\S+):\s*//) {
# Fixes #488554
$phline =~ s/\xef\xbb\xbf//g;
$phline =~ s/\N{U+FEFF}//g;
- last if $phline !~ m/^([\w-]+):\s*(\S.*)/;
+ last if $phline !~ m/^([\w-]+): # psuedoheader
+ (?:\s|\N{U+00A0})* # zero or more spaces, including
+ # non-breaking space
+ (\S.*)/x; # pseudoheader value
my ($fn, $fv) = ($1, $2);
$fv =~ s/\s*$//;
# pluralize tag/usertag