From c6496a07d159872ad46f8f2f95f3bcb2f0cef13d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Apr 2014 09:48:53 +0000 Subject: view: fix link to raw message from /f/ endpoint Ugh, at least this has a test... --- lib/PublicInbox/View.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox') 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) . ''; } @@ -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: <$html> "; + unless ($full_pfx) { + $href = "../m/$href"; + } $rv .= "(original)\n"; } -- cgit v1.2.3-24-ge0c7