diff options
author | terry%netscape.com <> | 1999-03-26 12:11:49 +0100 |
---|---|---|
committer | terry%netscape.com <> | 1999-03-26 12:11:49 +0100 |
commit | d8b930fa2293ea58383682c48cf375fa600fc0be (patch) | |
tree | a5e6aa90ae3a9a1a9f4d4601865bd12234badd94 | |
parent | 5e0915466c15ea7e55e691d19d4d023933f3be6a (diff) | |
download | bugzilla-d8b930fa2293ea58383682c48cf375fa600fc0be.tar.gz bugzilla-d8b930fa2293ea58383682c48cf375fa600fc0be.tar.xz |
Look for text like "bug 213" and make it a link to that bug...
-rw-r--r-- | bug_form.pl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bug_form.pl b/bug_form.pl index 360c55bbc..7398dae9f 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -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); |