diff options
author | Eric Wong <e@80x24.org> | 2018-12-30 12:41:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-12-30 20:15:06 +0000 |
commit | 7d82a8bc04ce2e686371abc6b438ab121b9fa7d0 (patch) | |
tree | 137fd61f2f12c0f781b670ef25bf65efbe60ab1b /lib/PublicInbox/SearchIdx.pm | |
parent | c3a8ba378c7d3548a5d3ede110b90f8aa8e2473e (diff) | |
download | public-inbox-7d82a8bc04ce2e686371abc6b438ab121b9fa7d0.tar.gz |
I've found two examples on https://lore.kernel.org/lkml/ where the messages declared themselves to be "multipart/mixed" but were actually plain text: <87llgalspt.fsf@free.fr> <200308111450.h7BEoOu20077@mail.osdl.org> With the mboxrd downloaded, mutt is able to view them without difficulty. Note: this change would require reindexing of Xapian to pick up the changes. But it's only two ancient messages, the first was resent by the original sender and the second is too old to be relevant.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index ca832ad3..76f3f33a 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -305,19 +305,7 @@ sub add_xapian ($$$$$) { $self->index_text($fn, 1, 'XFN'); } - return if $ct =~ m!\btext/x?html\b!i; - - my $s = eval { $part->body_str }; - if ($@) { - if ($ct =~ m!\btext/plain\b!i) { - # Try to assume UTF-8 because Alpine - # seems to do wacky things and set - # charset=X-UNKNOWN - $part->charset_set('UTF-8'); - $s = eval { $part->body_str }; - $s = $part->body if $@; - } - } + my ($s, undef) = msg_part_text($part, $ct); defined $s or return; my (@orig, @quot); |