use Debbugs::Config qw(:globals :text);
# for read_log_records
-use Debbugs::Log;
+use Debbugs::Log qw(read_log_records);
use Debbugs::MIME qw(convert_to_utf8 decode_rfc1522 create_mime_message);
use Debbugs::CGI qw(:url :html :util);
use Debbugs::Common qw(buglog getmaintainers);
$$this .= '<pre class="mime">[<a href="' . bug_url(@dlargs) . qq{">$printname</a> } .
"($type, $disposition)]</pre>\n";
- if ($msg and defined($att) and $att eq $#$attachments) {
+ if ($msg and defined($att) and $att == $#$attachments) {
my $head = $entity->head;
chomp(my $type = $entity->effective_type);
my $body = $entity->stringify_body;
my $body = $entity->bodyhandle->as_string;
$body = convert_to_utf8($body,$charset) if defined $charset;
$body = html_escape($body);
+ # Attempt to deal with format=flowed
+ if ($content_type =~ m/format\s*=\s*\"?flowed\"?/i) {
+ $body =~ s{^\ }{}mgo;
+ # we ignore the other things that you can do with
+ # flowed e-mails cause they don't really matter.
+ }
# Add links to URLs
$body =~ s,((ftp|http|https)://[\S~-]+?/?)((\>\;)?[)]?[']?[:.\,]?(\s|$)),<a href=\"$1\">$1</a>$3,go;
# Add links to bug closures
{(defined $2?$1.bug_links($2):'').$3.
join(' ',map {bug_links($_)} (split /\,?\s+/, $4))}eo;
# Add links to reassigned packages
- $output =~ s{(Bug reassigned from package \`)([^\']+)(' to \`)([^\']+)(')}
+ $output =~ s{(Bug reassigned from package \`)([^']+)((?:'|\&\#39;) to \`)([^']+)((?:'|\&\#39;))}
{$1.q(<a href=").pkg_url(pkg=>$2).qq(">$2</a>).$3.q(<a href=").pkg_url(pkg=>$4).qq(">$4</a>).$5}eo;
if (defined $time) {
$output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') ';
}
# Incomming Mail Message
my ($received,$hostname) = $record->{text} =~ m/Received: \(at (\S+)\) by (\S+)\;/;
- $output .= qq|<hr><p class="msgreceived"><a name="$msg_number"></a><a name="msg$msg_number">Message received</a> at |.
- html_escape("$received\@$hostname") . q| (<a href="| . bug_url($ref, msg=>$msg_number) . '">full text</a>'.q|, <a href="| . bug_url($ref, msg=>$msg_number,mbox=>'yes') .'">mbox</a>)'.":</p>\n";
+ $output .= qq|<hr><p class="msgreceived"><a name="$msg_number"></a><a name="msg$msg_number"></a><a href="#$msg_number">Message</a> received at |.
+ html_escape("$received\@$hostname") .
+ q| (<a href="| . bug_url($ref, msg=>$msg_number) . '">full text</a>'.
+ q|, <a href="| . bug_url($ref, msg=>$msg_number,mbox=>'yes') .'">mbox</a>)'.":</p>\n";
$output .= handle_email_message($record->{text},
ref => $bug_number,
msg_number => $msg_number,
{
if (allDivs[i].className == "infmessage")
{
- allDivs[i].style.display=(allDivs[i].style.display == 'none') ? 'block' : 'none';
+ allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
+ break;
}
}
}