]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 237774: The text "bug 0" auto-linkifies to "<missing bug number>" - Patch by...
authorlpsolit%gmail.com <>
Fri, 13 May 2005 00:57:49 +0000 (00:57 +0000)
committerlpsolit%gmail.com <>
Fri, 13 May 2005 00:57:49 +0000 (00:57 +0000)
globals.pl

index 99a58dadedd66690f6b4b42d06e5c4e3aaf8a5b5..32f11dad5223682f8789d10f2df5cc43907aab25 100644 (file)
@@ -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