X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=867ed6fab2e33508ed7f8380251e45025441d95b;hb=3cda6050b7c8f73e7fd86f88efc5cd42d0c13f73;hp=bcd2ebc4cc8d0fd0df24e99a6c922d06de835536;hpb=be984ce279776d4513b4ca1bff05ebecafdd1bad;p=public-inbox.git diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index bcd2ebc4..867ed6fa 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -12,9 +12,8 @@ use Encode qw/find_encoding/; use Encode::MIME::Header; use Email::MIME::ContentType qw/parse_content_type/; use PublicInbox::Hval; -use PublicInbox::MID qw/mid_clean id_compress mid2path/; -use Digest::SHA qw/sha1_hex/; -my $SALT = rand; +use PublicInbox::Linkify; +use PublicInbox::MID qw/mid_clean id_compress mid2path mid_mime/; require POSIX; # TODO: make these constants tunable @@ -35,14 +34,54 @@ sub msg_html { } else { $footer = ''; } - headers_to_html_header($mime, $full_pfx, $ctx) . + my $hdr = $mime->header_obj; + headers_to_html_header($hdr, $full_pfx, $ctx) . multipart_text_as_html($mime, $full_pfx) . '
' . - html_footer($mime, 1, $full_pfx, $ctx) . + html_footer($hdr, 1, $full_pfx, $ctx) . $footer . '