X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=47082431ec8fa375580c7b85afa95117ea0496a9;hb=118ac5c2dc0e7a193ff58f2a9003636e1353583c;hp=5076cf923baa671f6a6e1b8375f6e6ca395e6e6c;hpb=3e9e1b30f3d25adf7e1ffee1047efb01870378c9;p=public-inbox.git diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 5076cf92..47082431 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -3,35 +3,38 @@ package PublicInbox::View; use strict; use warnings; -use PublicInbox::Hval; use URI::Escape qw/uri_escape_utf8/; +use Date::Parse qw/str2time/; 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 mid_compressed mid2path/; +use Digest::SHA; require POSIX; # TODO: make these constants tunable use constant MAX_INLINE_QUOTED => 12; # half an 80x24 terminal use constant MAX_TRUNC_LEN => 72; -use constant PRE_WRAP => '
'; +use constant PRE_WRAP => ""; +use constant T_ANCHOR => '#u'; *ascii_html = *PublicInbox::Hval::ascii_html; my $enc_utf8 = find_encoding('UTF-8'); -my $enc_mime = find_encoding('MIME-Header'); # public functions: sub msg_html { - my ($class, $mime, $full_pfx, $footer) = @_; + my ($class, $mime, $full_pfx, $footer, $srch) = @_; if (defined $footer) { $footer = "\n" . $footer; } else { $footer = ''; } - headers_to_html_header($mime, $full_pfx) . + headers_to_html_header($mime, $full_pfx, $srch) . multipart_text_as_html($mime, $full_pfx) . '
' . PRE_WRAP . - html_footer($mime, 1) . $footer . + html_footer($mime, 1, $full_pfx, $srch) . $footer . '