From: Don Armstrong Date: Wed, 7 May 2014 01:41:28 +0000 (-0700) Subject: fix #747267 by causing the closing regex to require a space, or some other non-word... X-Git-Tag: release/2.6.0~260 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=1fc2d1468742f5478aa2592cc31a450c2ea7f141;hp=c04432ba467f7f957835b7264157951787e27f4c fix #747267 by causing the closing regex to require a space, or some other non-word character --- diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index 6076a64..f2ae9ac 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -274,7 +274,11 @@ sub display_entity { ((?:\>\;)?[)]?(?:'|\&\#39\;)?[:.\,]?(?:\s|$)) # terminators }{$1$2}gox; # Add links to bug closures - $body =~ s[(closes:\s*(?:bug)?\#?\s?\d+(?:,?\s*(?:bug)?\#?\s?\d+)*)] + $body =~ s[((?:closes|see):\s* # start of closed/referenced bugs + (?:bug)?\#?\s?\d+\s? # first bug + (?:,?\s*(?:bug)?\#?\s?\d+)* # additional bugs + (?:\s|\n|\)|\]|\}|\.|\,|$)) # ends with a space, newline, end of string, or ); fixes #747267 + ] [my $temp = $1; $temp =~ s{(\d+)} {bug_links(bug=>$1)}ge;