about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-04-22 09:48:53 +0000
committerEric Wong <e@80x24.org>2014-04-22 09:48:53 +0000
commitc6496a07d159872ad46f8f2f95f3bcb2f0cef13d (patch)
treef9b058d9e03d37f02412b9fb1eeefa083be43bb8 /lib
parent48dc8ff5e67714985897047c189bdf019b796a60 (diff)
downloadpublic-inbox-c6496a07d159872ad46f8f2f95f3bcb2f0cef13d.tar.gz
Ugh, at least this has a test...
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/View.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 5b24706c..355d346a 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -19,7 +19,7 @@ my $enc_mime = find_encoding('MIME-Header');
 sub as_html {
         my ($class, $mime, $full_pfx) = @_;
 
-        headers_to_html_header($mime) .
+        headers_to_html_header($mime, $full_pfx) .
                 multipart_text_as_html($mime, $full_pfx) .
                 '</pre></body></html>';
 }
@@ -150,7 +150,7 @@ sub ascii_html {
 }
 
 sub headers_to_html_header {
-        my ($simple) = @_;
+        my ($simple, $full_pfx) = @_;
 
         my $rv = "";
         my @title;
@@ -180,6 +180,9 @@ sub headers_to_html_header {
         if (defined $mid) {
                 my ($html, $href) = trim_message_id($mid);
                 $rv .= "Message-ID: &lt;$html&gt; ";
+                unless ($full_pfx) {
+                        $href = "../m/$href";
+                }
                 $rv .= "(<a href=\"$href.txt\">original</a>)\n";
         }