diff options
author | lpsolit%gmail.com <> | 2005-05-13 00:57:49 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-05-13 00:57:49 +0000 |
commit | 922142e12b7b8c3f12b13de32e0b4bf39f147e92 (patch) | |
tree | 3e45400edc8a59265acb736c33656d37c93536af | |
parent | Bug 293907: remove tabs from bug_email.pl - Patch by Frédéric Buclin <LpSol... (diff) | |
download | bugzilla-922142e12b7b8c3f12b13de32e0b4bf39f147e92.tar.gz bugzilla-922142e12b7b8c3f12b13de32e0b4bf39f147e92.tar.bz2 bugzilla-922142e12b7b8c3f12b13de32e0b4bf39f147e92.zip |
Bug 237774: The text "bug 0" auto-linkifies to "<missing bug number>" - Patch by Nick Barnes <nb+bz@ravenbrook.com> r=LpSolit a=justdave
-rw-r--r-- | globals.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/globals.pl b/globals.pl index 99a58dade..32f11dad5 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 |