From: Eric Wong <e@80x24.org>
Date: Thu, 30 Jun 2016 18:59:12 +0000 (+0000)
Subject: view: fix permalink and raw links at the top
X-Git-Tag: v1.0.0~340
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d766499de41c8409d10d377bb0faaad1413028b9;p=public-inbox.git

view: fix permalink and raw links at the top

Oops :x  I really need to whip check-inbox.perl into
shape or at least start running it, again.

Fixes: e29518088b3f ("view: fix up some HTML injection via Message-ID vectors")
---

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 11d8dd53..140cfeed 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -138,8 +138,8 @@ sub index_entry {
 	$rv .= "From: "._hdr_names($hdr, 'From').' @ '._msg_date($hdr)." UTC";
 	my $upfx = $ctx->{-upfx};
 	my $mhref = $upfx . $mid->as_href . '/';
-	$rv .= qq{ (<a\nhref="$mhref/">permalink</a> / };
-	$rv .= qq{<a\nhref="$mhref/raw">raw</a>)\n};
+	$rv .= qq{ (<a\nhref="$mhref">permalink</a> / };
+	$rv .= qq{<a\nhref="${mhref}raw">raw</a>)\n};
 	$rv .= '  '.join('; +', @tocc) . "\n" if @tocc;
 
 	my $mapping = $ctx->{mapping};