]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: fix double-escaping of ghost links
authorEric Wong <e@80x24.org>
Wed, 6 Jul 2016 02:05:50 +0000 (02:05 +0000)
committerEric Wong <e@80x24.org>
Wed, 6 Jul 2016 07:12:45 +0000 (07:12 +0000)
Oops :x

lib/PublicInbox/View.pm

index dc6096f1df8a29f661ffa162efcdf9298c5eb65f..c230836d0fc9b48eca24785c9fc54c162128f92b 100644 (file)
@@ -870,7 +870,7 @@ sub emit_topics {
                my ($level, $subj) = @$info;
                my $n = delete $subjs->{$subj};
                my ($mid, $ts) = @{delete $latest->{$subj}};
-               $mid = PublicInbox::Hval->new_msgid($mid)->as_href;
+               my $href = PublicInbox::Hval->new_msgid($mid)->as_href;
                $pfx = indent_for($level);
                my $nl = $level == $prev ? "\n" : '';
                if ($nl && $cur) {
@@ -886,7 +886,7 @@ sub emit_topics {
                }
 
                $subj = PublicInbox::Hval->new($subj)->as_html;
-               $cur->[1] .= "<a\nhref=\"$mid/T/#u\"><b>$subj</b></a>\n";
+               $cur->[1] .= "<a\nhref=\"$href/T/#u\"><b>$subj</b></a>\n";
                $ts = fmt_ts($ts);
                my $attr = " $ts UTC";
 
@@ -895,8 +895,8 @@ sub emit_topics {
                $n = $n == 1 ? '' : " ($n+ messages)";
 
                if ($level == 0 || $attr ne $prev_attr) {
-                       my $mbox = qq(<a\nhref="$mid/t.mbox.gz">mbox.gz</a>);
-                       my $atom = qq(<a\nhref="$mid/t.atom">Atom</a>);
+                       my $mbox = qq(<a\nhref="$href/t.mbox.gz">mbox.gz</a>);
+                       my $atom = qq(<a\nhref="$href/t.atom">Atom</a>);
                        $pfx .= INDENT if $level > 0;
                        $cur->[1] .= $pfx . $attr . $n . " - $mbox / $atom\n";
                        $prev_attr = $attr;