From 0de74ae8ec895b9085ee7afed47cd90fe52744c6 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 13 May 2005 00:52:46 +0000 Subject: Bug 237774: The text "bug 0" auto-linkifies to "" - Patch by Nick Barnes r=LpSolit a=myk --- globals.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/globals.pl b/globals.pl index 009f93ee9..09be4e732 100644 --- a/globals.pl +++ b/globals.pl @@ -894,8 +894,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 -- cgit v1.2.3-24-g4f1b