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;
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 => '` ';
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;
my $rv = $ctx->{obuf};
$$rv .= qq($nl<a\nhref="$ctx->{mhref}$idx-$sfn">);
if ($err) {
- $$rv .= "[-- Warning: decoded text below may be mangled --]\n";
+ $$rv .= <<EOF;
+[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
+EOF
}
$$rv .= "[-- Attachment #$idx: ";
my $ts = "Type: $ct, Size: $size bytes";
$s .= "\n" unless $s =~ /\n\z/s;
# split off quoted and unquoted blocks:
- my @sections = split(/((?:^>[^\n]*\n)+)/sm, $s);
+ my @sections = PublicInbox::MsgIter::split_quotes($s);
$s = '';
my $rv = $ctx->{obuf};
if (defined($fn) || $depth > 0 || $err) {
sub dump_topics {
my ($ctx) = @_;
my $order = delete $ctx->{order}; # [ ds, subj1, subj2, subj3, ... ]
- if (!@$order) {
+ unless ($order) {
$ctx->{-html_tip} = '<pre>[No topics in range]</pre>';
return 404;
}