X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=47082431ec8fa375580c7b85afa95117ea0496a9;hp=6e4d17894ca3534f66ca0ac28a5ce803ab671eba;hb=118ac5c2dc0e7a193ff58f2a9003636e1353583c;hpb=af0c513d49bae691f636b00efd1635b565b40c9d diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 6e4d1789..47082431 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -3,17 +3,21 @@ 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 T_ANCHOR => '#u'; *ascii_html = *PublicInbox::Hval::ascii_html; @@ -21,16 +25,16 @@ my $enc_utf8 = find_encoding('UTF-8'); # 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) . '