- push @links, map {(munge_url('pkgreport.cgi?',
+ push @links, map {my $t_type = $type;
+ if ($_ =~ s/^src://) {
+ $t_type = 'src';
+ }
+ (munge_url('pkgreport.cgi?',
} make_list($param{$type}) if exists $param{$type};
}
for my $type (qw(maint owner submitter correspondent)) {
} make_list($param{$type}) if exists $param{$type};
}
for my $type (qw(maint owner submitter correspondent)) {
sub maybelink {
my ($links,$regex,$join) = @_;
if (not defined $regex and not defined $join) {
sub maybelink {
my ($links,$regex,$join) = @_;
if (not defined $regex and not defined $join) {
- $links =~ s{((?:ftp|http|https)://[\S~-]+?/?)([\)\'\:\.\,]?(?:\s|\.<|$))}
- {q(<a href=\").html_escape($1).q(\">).html_escape($1).q(</a>).$2}geimo;
+ $links =~ s{(.*?)((?:(?:ftp|http|https)://[\S~-]+?/?)?)([\)\'\:\.\,]?(?:\s|\.<|$))}
+ {html_escape($1).(length $2?q(<a href=").html_escape($2).q(">).html_escape($2).q(</a>):'').html_escape($3)}geimo;
return Debbugs::Text::fill_in_template(template=>$param{template},
(exists $param{language}?(language=>$param{language}):()),
variables => $variables,
return Debbugs::Text::fill_in_template(template=>$param{template},
(exists $param{language}?(language=>$param{language}):()),
variables => $variables,