diff options
author | Eric Wong <e@80x24.org> | 2016-03-12 06:51:22 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-12 06:51:22 +0000 |
commit | f4af1462c2e52a5f4ed8b7de855868b8d457627e (patch) | |
tree | 327a37c971ff4de402340625a4d6278840e7c2b8 /lib | |
parent | 476fc666c223f0fbe98ee1f66f7e282abf8adb56 (diff) | |
download | public-inbox-f4af1462c2e52a5f4ed8b7de855868b8d457627e.tar.gz |
Hard tabs *may* be searchable, so preserve them since they do not take up any more space than a normal space. However, CR (carriage return) is worthless and likely a sign of a buggy mail (or spam) client anyways.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/SearchMsg.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 477ffff7..a0899159 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -65,7 +65,8 @@ sub __hdr ($$) { my $mime = $self->{mime} or return; $val = $mime->header($field); $val = '' unless defined $val; - $val =~ tr/\t\r\n/ /; + $val =~ tr/\n/ /; + $val =~ tr/\r//d; $self->{$field} = $val; } |