From: Don Armstrong Date: Mon, 25 May 2009 19:54:23 +0000 (-0700) Subject: Properly html_escape un-processed parts in maybelink (closes: #530506) X-Git-Tag: release/2.6.0~461^2~26 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0b62859665c8495ac4008725aa63c87ccd2aeeca;p=debbugs.git Properly html_escape un-processed parts in maybelink (closes: #530506) --- diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index d305aed7..9d96ed9e 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; diff --git a/debian/changelog b/debian/changelog index 93eaa055..72f13838 100644 --- a/debian/changelog +++ b/debian/changelog @@ -248,6 +248,7 @@ debbugs (2.4.2~exp0) UNRELEASED; urgency=low * Don't have reply/subscribe links for archived bugs (closes: #511864) * Fix issue with no-maintainer bugs assigned to multiple packages (closes: #528249) + * Properly html_escape un-processed parts in maybelink (closes: #530506) -- Colin Watson Fri, 20 Jun 2003 18:57:25 +0100