about summary refs log tree commit homepage
path: root/lib/PublicInbox/MsgIter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MsgIter.pm')
-rw-r--r--lib/PublicInbox/MsgIter.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm
index d9df32ab..6453d9f1 100644
--- a/lib/PublicInbox/MsgIter.pm
+++ b/lib/PublicInbox/MsgIter.pm
@@ -38,6 +38,11 @@ sub msg_iter ($$) {
 sub msg_part_text ($$) {
         my ($part, $ct) = @_;
 
+        # TODO: we may offer a separate sub for people who need to index
+        # HTML-only mail, but the majority of HTML mail is multipart/alternative
+        # with a text part which we don't have to waste cycles decoding
+        return if $ct =~ m!\btext/x?html\b!;
+
         my $s = eval { $part->body_str };
         my $err = $@;