diff --git a/webtools/bugzilla/bug_form.pl b/webtools/bugzilla/bug_form.pl index 360c55bbcac..7398dae9fa3 100644 --- a/webtools/bugzilla/bug_form.pl +++ b/webtools/bugzilla/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{$item}; + $things[$count++] = $item; + } $text = value_quote($text);