about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-04-20 03:27:37 +0000
committerEric Wong <e@80x24.org>2018-04-20 03:27:53 +0000
commit0ef5872cee83f07c9ae7afceb2e92257507dc3ca (patch)
tree5464f1ae1d633a31cdf4bcb9808e5a66f3113528 /lib/PublicInbox/SearchMsg.pm
parente350de7fdbe12dafc36e893e66ce8c93ec6dc3f2 (diff)
downloadpublic-inbox-0ef5872cee83f07c9ae7afceb2e92257507dc3ca.tar.gz
For Subject/To/Cc/From headers, we squeeze them to a space (' ').

For Message-IDs (including References/In-Reply-To), '\t', '\n', '\r'
are deleted since some MUAs might screw them up:

  https://public-inbox.org/git/656C30A1EFC89F6B2082D9B6@localhost/raw
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index ab971e00..c7787ea1 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -100,7 +100,7 @@ sub __hdr ($$) {
         my $mime = $self->{mime} or return;
         $val = $mime->header($field);
         $val = '' unless defined $val;
-        $val =~ tr/\n/ /;
+        $val =~ tr/\t\n/  /;
         $val =~ tr/\r//d;
         $self->{$field} = $val;
 }