my ($arg, $link) = mailto_arg_link($hdr);
push @$arg, '/path/to/YOUR_REPLY';
- $arg = join(" \\\n ", '', @$arg);
+ $arg = ascii_html(join(" \\\n ", '', @$arg));
<<EOF
-<pre
-id=R>You may reply publically to <a
-href=#t>this message</a> via
-plain-text email using any one of the following methods:
+<hr><pre
+id=R><b>Reply instructions:</b>
+
+You may reply publically to <a
+href=#t>this message</a> via plain-text email
+using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: <a
return missing_thread($ctx) if $nr == 0;
my $skel = '<hr><pre>';
$skel .= $nr == 1 ? 'only message in thread' : 'end of thread';
- $skel .= ", back to <a\nhref=\"../../\">index</a>";
- $skel .= "\n<a\nid=t>$nr+ messages in thread:</a> (download: ";
- $skel .= "<a\nhref=\"../t.mbox.gz\">mbox.gz</a>";
+ $skel .= ", back to <a\nhref=\"../../\">index</a>\n\n";
+ $skel .= "<b\nid=t>Thread overview:</b> ";
+ $skel .= $nr == 1 ? '(only message)' : "$nr+ messages";
+ $skel .= " (download: <a\nhref=\"../t.mbox.gz\">mbox.gz</a>";
$skel .= " / follow: <a\nhref=\"../t.atom\">Atom feed</a>)\n";
+ $skel .= "-- links below jump to the message on this page --\n";
$ctx->{-upfx} = '../../';
$ctx->{cur_level} = 0;
$ctx->{dst} = \$skel;
qq(/ <a\nhref="${tpfx}t.atom">Atom feed</a>);
my $parent = in_reply_to($hdr);
+ $$dst .= "\n<b>Thread overview: </b>";
if ($nr <= 1) {
if (defined $parent) {
$$dst .= "($expand)\n ";
my $subj = $hdr->header('Subject') || '';
$subj = "Re: $subj" unless $subj =~ /\bRe:/i;
my $mid = $hdr->header_raw('Message-ID');
- push @arg, '--in-reply-to='.ascii_html(squote_maybe(mid_clean($mid)));
+ push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid));
my $irt = uri_escape_utf8($mid);
delete $cc{$to};
- push @arg, '--to=' . ascii_html($to);
+ push @arg, "--to=$to";
$to = uri_escape_utf8($to);
$subj = uri_escape_utf8($subj);
- my $cc = join(',', sort values %cc);
- push @arg, '--cc=' . ascii_html($cc);
- $cc = uri_escape_utf8($cc);
+ my @cc = sort values %cc;
+ push(@arg, map { "--cc=$_" } @cc);
+ my $cc = uri_escape_utf8(join(',', @cc));
my $href = "mailto:$to?In-Reply-To=$irt&Cc=${cc}&Subject=$subj";
$href =~ s/%20/+/g;
# $n isn't the total number of posts on the topic,
# just the number of posts in the current results window
- $n = $n == 1 ? '' : " ($n+ messages)";
+ my $anchor;
+ if ($n == 1) {
+ $n = '';
+ $anchor = '#u'; # top of only message
+ } else {
+ $n = " ($n+ messages)";
+ $anchor = '#t'; # thread skeleton
+ }
my $mbox = qq(<a\nhref="$href/t.mbox.gz">mbox.gz</a>);
my $atom = qq(<a\nhref="$href/t.atom">Atom</a>);
- my $s = "<a\nhref=\"$href/T/#t\"><b>$top</b></a>\n" .
+ my $s = "<a\nhref=\"$href/T/$anchor\"><b>$top</b></a>\n" .
" $ts UTC $n - $mbox / $atom\n";
for (my $i = 0; $i < scalar(@ex); $i += 2) {
my $level = $ex[$i];