about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ExtMsg.pm2
-rw-r--r--lib/PublicInbox/Search.pm2
-rw-r--r--lib/PublicInbox/SearchView.pm10
-rw-r--r--lib/PublicInbox/View.pm1
-rw-r--r--lib/PublicInbox/WatchMaildir.pm3
5 files changed, 10 insertions, 8 deletions
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm
index 67ce0407..6cfc6c32 100644
--- a/lib/PublicInbox/ExtMsg.pm
+++ b/lib/PublicInbox/ExtMsg.pm
@@ -16,7 +16,7 @@ use PublicInbox::WwwStream;
 our @EXT_URL = (
         # leading "//" denotes protocol-relative (http:// or https://)
         '//marc.info/?i=%s',
-        '//mid.mail-archive.com/%s',
+        '//www.mail-archive.com/search?l=mid&q=%s',
         'http://mid.gmane.org/%s',
         'https://lists.debian.org/msgid-search/%s',
         '//docs.FreeBSD.org/cgi/mid.cgi?db=mid&id=%s',
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 02d1827e..b0bfe232 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -89,7 +89,7 @@ are also supported
 EOF
         'b:' => 'match within message body, including text attachments',
         'nq:' => 'match non-quoted text within message body',
-        'quot:' => 'match quoted text within message body',
+        'q:' => 'match quoted text within message body',
         'n:' => 'match filename of attachment(s)',
         't:' => 'match within the To header',
         'c:' => 'match within the Cc header',
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index f1c4b6a0..cec87c6a 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -145,7 +145,7 @@ sub search_nav_bot {
         my $o = $q->{o};
         my $end = $o + $nr;
         my $beg = $o + 1;
-        my $rv = '</pre><hr><pre>';
+        my $rv = '</pre><hr><pre id=t>';
         if ($beg <= $end) {
                 $rv .= "Results $beg-$end of $total";
                 $rv .= ' (estimated)' if $end != $total;
@@ -185,9 +185,9 @@ sub mset_thread {
                 $pct{$smsg->mid} = $i->get_percent;
                 $smsg;
         } ($mset->items) ]});
-
+        my $r = $q->{r};
         my $rootset = PublicInbox::SearchThread::thread($msgs,
-                $q->{r} ? sort_relevance(\%pct) : *PublicInbox::View::sort_ts);
+                $r ? sort_relevance(\%pct) : *PublicInbox::View::sort_ts);
         my $skel = search_nav_bot($mset, $q). "<pre>";
         my $inbox = $ctx->{-inbox};
         $ctx->{-upfx} = '';
@@ -203,11 +203,11 @@ sub mset_thread {
 
         PublicInbox::View::walk_thread($rootset, $ctx,
                 *PublicInbox::View::pre_thread);
-
+        @$msgs = reverse @$msgs if $r;
         my $mime;
         sub {
                 return unless $msgs;
-                while ($mime = shift @$msgs) {
+                while ($mime = pop @$msgs) {
                         $mime = $inbox->msg_by_smsg($mime) and last;
                 }
                 if ($mime) {
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 0b1ec75b..9ef4712f 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -438,6 +438,7 @@ sub attach_link ($$$$;$) {
         }
         $ret .= "[-- Attachment #$idx: ";
         my $ts = "Type: $ct, Size: $size bytes";
+        $desc = ascii_html($desc);
         $ret .= ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]";
         $ret .= "</a>\n";
 }
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 1823c248..985f9192 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -97,7 +97,8 @@ sub _try_fsn_paths {
 
 sub _remove_spam {
         my ($self, $path) = @_;
-        $path =~ /:2,[A-R]*S[T-Z]*\z/i or return;
+        # path must be marked as (S)een
+        $path =~ /:2,[A-R]*S[T-Za-z]*\z/ or return;
         my $mime = _path_to_mime($path) or return;
         _force_mid($mime);
         $self->{config}->each_inbox(sub {