]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Look for text like "bug 213" and make it a link to that bug...
authorterry%netscape.com <>
Fri, 26 Mar 1999 11:11:49 +0000 (11:11 +0000)
committerterry%netscape.com <>
Fri, 26 Mar 1999 11:11:49 +0000 (11:11 +0000)
bug_form.pl

index 360c55bbcacea29bfb67580c7e384b3ee3926de8..7398dae9fa3f82415b9dca7f30d2c8805522b704 100644 (file)
@@ -49,7 +49,7 @@ sub quoteUrls {
 
     my @things;
     while ($text =~ s%((mailto:)?([\w\.\-\+\=]+\@\w+(?:\.\w+)+)\b|
-                       (\b((?:$protocol):\S+[\w/])))%"##".$count."##"%exo) {
+                       (\b((?:$protocol):\S+[\w/])))%"##$count##"%exo) {
         my $item = $&;
 
         $item = value_quote($item);
@@ -64,6 +64,15 @@ sub quoteUrls {
 
         $things[$count++] = $item;
     }
+    while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) {
+        my $item = $&;
+        my $num = $2;
+        $item = value_quote($item); # Not really necessary, since we know
+                                # there's no special chars in it.
+        my $base = Param('urlbase');
+        $item = qq{<A HREF="${base}show_bug.cgi?id=$num">$item</A>};
+        $things[$count++] = $item;
+    }
 
     $text = value_quote($text);