From: lpsolit%gmail.com <> Date: Fri, 13 May 2005 00:57:49 +0000 (+0000) Subject: Bug 237774: The text "bug 0" auto-linkifies to "" - Patch by... X-Git-Tag: bugzilla-2.18.2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=922142e12b7b8c3f12b13de32e0b4bf39f147e92;p=thirdparty%2Fbugzilla.git Bug 237774: The text "bug 0" auto-linkifies to "" - Patch by Nick Barnes r=LpSolit a=justdave --- diff --git a/globals.pl b/globals.pl index 99a58daded..32f11dad52 100644 --- a/globals.pl +++ b/globals.pl @@ -1033,8 +1033,11 @@ sub GetAttachmentLink { sub GetBugLink { my ($bug_num, $link_text, $comment_num) = @_; - $bug_num || return "<missing bug number>"; - detaint_natural($bug_num) || return "<invalid bug number>"; + if (! defined $bug_num || $bug_num eq "") { + return "<missing bug number>"; + } + my $quote_bug_num = html_quote($bug_num); + detaint_natural($bug_num) || return "<invalid bug number: $quote_bug_num>"; # If we've run GetBugLink() for this bug number before, %::buglink # will contain an anonymous array ref of relevent values, if not