X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=9ef1f68ae914fdbf54ce5f9aa029449917b7a171;hb=f9b63d4cd4d5a58c37ed8464b2d335a6932cc118;hp=91443f55c177bc12d8578a7a4d95a4eae1814333;hpb=9703d80efd848f582e5b265db1958e0f143d8712;p=public-inbox.git
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 91443f55..9ef1f68a 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -10,7 +10,8 @@ use bytes (); # only for bytes::length
use PublicInbox::MsgTime qw(msg_datestamp);
use PublicInbox::Hval qw(ascii_html obfuscate_addrs prurl mid_href);
use PublicInbox::Linkify;
-use PublicInbox::MID qw/id_compress mids mids_for_index references/;
+use PublicInbox::MID qw(id_compress mids mids_for_index references
+ $MID_EXTRACT);
use PublicInbox::MsgIter;
use PublicInbox::Address;
use PublicInbox::WwwStream;
@@ -18,7 +19,7 @@ use PublicInbox::Reply;
use PublicInbox::ViewDiff qw(flush_diff);
use POSIX qw(strftime);
use Time::Local qw(timegm);
-use PublicInbox::SearchMsg qw(subject_normalized);
+use PublicInbox::Smsg qw(subject_normalized);
use constant COLS => 72;
use constant INDENT => ' ';
use constant TCHILD => '` ';
@@ -299,7 +300,7 @@ sub _th_index_lite {
if (my $smsg = $node->{smsg}) {
# delete saves about 200KB on a 1K message thread
if (my $refs = delete $smsg->{references}) {
- ($$irt) = ($refs =~ m/<([^>]+)>\z/);
+ ($$irt) = ($refs =~ m/$MID_EXTRACT\z/o);
}
}
my $irt_map = $mapping->{$$irt} if defined $$irt;
@@ -503,9 +504,6 @@ sub attach_link ($$$$;$) {
# spotting MUA problems:
$ct =~ s/;.*// unless $err;
$ct = ascii_html($ct);
- my $desc = $part->header('Content-Description');
- $desc = $fn unless defined $desc;
- $desc = '' unless defined $desc;
my $sfn;
if (defined $fn && $fn =~ /\A$PublicInbox::Hval::FN\z/o) {
$sfn = $fn;
@@ -517,10 +515,13 @@ sub attach_link ($$$$;$) {
my $rv = $ctx->{obuf};
$$rv .= qq($nl{mhref}$idx-$sfn">);
if ($err) {
- $$rv .= "[-- Warning: decoded text below may be mangled --]\n";
+ $$rv .= <
[No topics in range]'; return 404; }