aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-05-13 00:57:49 +0000
committerlpsolit%gmail.com <>2005-05-13 00:57:49 +0000
commit922142e12b7b8c3f12b13de32e0b4bf39f147e92 (patch)
tree3e45400edc8a59265acb736c33656d37c93536af
parentBug 293907: remove tabs from bug_email.pl - Patch by Frédéric Buclin <LpSol... (diff)
downloadbugzilla-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.pl7
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 "&lt;missing bug number&gt;";
- detaint_natural($bug_num) || return "&lt;invalid bug number&gt;";
+ if (! defined $bug_num || $bug_num eq "") {
+ return "&lt;missing bug number&gt;";
+ }
+ my $quote_bug_num = html_quote($bug_num);
+ detaint_natural($bug_num) || return "&lt;invalid bug number: $quote_bug_num&gt;";
# If we've run GetBugLink() for this bug number before, %::buglink
# will contain an anonymous array ref of relevent values, if not