about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-14 10:21:10 +0000
committerEric Wong <e@80x24.org>2016-08-14 11:04:46 +0000
commit5f83592e6ad3a6b7d1824e339a083db1e391145d (patch)
tree9bbcbeeeca9e4a92e90309e8520c43944480db55 /lib/PublicInbox/View.pm
parent9d1e5fadd7d18f4c96ab0509d673040e34225a04 (diff)
downloadpublic-inbox-5f83592e6ad3a6b7d1824e339a083db1e391145d.tar.gz
Ensure we usually strip one level of '<>' from Message-IDs,
since our internal SQLite, Xapian, and SHA-1 storage all
assume that.

Realistically, we screw up if somebody has '<<' or '>>',
but those are screwed up mail clients and we can deal with
it another time.  Currently, this means some messages with
'>>' in References or Message-Id are not handled correctly,
yet, but we match the behavior of Mail::Thread in keeping
the extra '>'.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 34f97c76..6f79f601 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -491,7 +491,7 @@ sub _msg_html_prepare {
                 $ctx->{-upfx} = '../';
         }
         my @title;
-        my $mid = $hdr->header_raw('Message-ID');
+        my $mid = mid_clean($hdr->header_raw('Message-ID'));
         $mid = PublicInbox::Hval->new_msgid($mid);
         foreach my $h (qw(From To Cc Subject Date)) {
                 my $v = $hdr->header($h);