]> git.donarmstrong.com Git - debbugs.git/commitdiff
fix #747267 by causing the closing regex to require a space, or some other non-word...
authorDon Armstrong <don@donarmstrong.com>
Wed, 7 May 2014 01:41:28 +0000 (18:41 -0700)
committerDon Armstrong <don@donarmstrong.com>
Wed, 7 May 2014 01:41:28 +0000 (18:41 -0700)
Debbugs/CGI/Bugreport.pm

index 6076a642ecd7334b19286671c9a4ed21f2294042..f2ae9ac410c6ed98955d6016f1f6d76e6fbc879e 100644 (file)
@@ -274,7 +274,11 @@ sub display_entity {
                    ((?:\&gt\;)?[)]?(?:'|\&\#39\;)?[:.\,]?(?:\s|$)) # terminators
              }{<a href=\"$1\">$1</a>$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;