--- trunk/httpd.pl 2004/05/05 15:38:35 7 +++ trunk/httpd.pl 2004/05/06 12:40:11 12 @@ -78,6 +78,10 @@ # my $html; + if ($param->{'search_val'} && $param->{'search_fld'} && !$param->{'search'}) { + $param->{'search'} = $param->{'search_fld'}.":".$param->{'search_val'}; + } + # show search results # ?search=foo:bar if ($param->{'search'}) { @@ -119,12 +123,19 @@ # template toolkit filter +#use Text::Context::EitherSide; + sub body5_filter { my $text = shift; $text =~ s/^\s+//gs; - $text =~ s/[\n\r]+[\>:\|=]+\s*.*?[\n\r]+//sg; # remove quoted text + $text =~ s/^[\>:\|=]+\s*.*?$//msg; # remove quoted text + $text =~ s/[\n\r]+/\n/gs; # compress cr/lf $text =~ s,^((?:.*?[\n\r]){5}).*$,$1--8<--[cut]--8<--,s; $text =~ s/[\n\r]+--\s*[\n\r]+.*$//s; + +# my $context = Text::Context::EitherSide->new($text, context => 5); +# return $context->as_string("perl"); + return $text; }