}
-=head HTML
+=head1 HTML
=head2 htmlize_packagelinks
%options,
$type => $_,
),
- $_);
+ ($type eq 'src'?'src:':'').$_);
} 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) {
- $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 $links;
}
$join = ' ' if not defined $join;
if (defined $value and $o_value eq $value) {
$selected = ' selected';
}
- $output .= qq(<option value="$o_value"$selected>$name</option>\n);
+ $output .= q(<option value=").html_escape($o_value).qq("$selected>).
+ html_escape($name).qq(</option>\n);
}
return $output;
};
return Debbugs::Text::fill_in_template(template=>$param{template},
(exists $param{language}?(language=>$param{language}):()),
variables => $variables,
+ hole_var => {'&html_escape' => \&html_escape,
+ },
);
}