X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI.pm;h=9d96ed9e287f2608ea638d760ea4b54473b61430;hb=0b62859665c8495ac4008725aa63c87ccd2aeeca;hp=d305aed7e2724261fa1c3723846bc378e0351a02;hpb=f3e9030c5d22122dc4e7a4713b1c3413592a0d02;p=debbugs.git diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index d305aed..9d96ed9 100644 --- a/Debbugs/CGI.pm +++ b/Debbugs/CGI.pm @@ -536,8 +536,8 @@ the split links with commas and spaces. sub maybelink { my ($links,$regex,$join) = @_; if (not defined $regex and not defined $join) { - $links =~ s{((?:ftp|http|https)://[\S~-]+?/?)([\)\'\:\.\,]?(?:\s|\.<|$))} - {q().html_escape($1).q().$2}geimo; + $links =~ s{(.*?)((?:(?:ftp|http|https)://[\S~-]+?/?)?)([\)\'\:\.\,]?(?:\s|\.<|$))} + {html_escape($1).(length $2?q().html_escape($2).q():'').html_escape($3)}geimo; return $links; } $join = ' ' if not defined $join;