From b3cdb97bbfa7fa359d30267530dbc6f213ba33c3 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 22 Feb 2006 21:28:45 +0000 Subject: Bug 172415: Bugzilla should support URLs containing bug IDs with a leading # - Patch by Marc Schumann r=gerv a=justdave --- Bugzilla/Bug.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6165fd2bb..302ac38b7 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1148,9 +1148,11 @@ sub ValidateBugID { my $dbh = Bugzilla->dbh; my $user = Bugzilla->user; - # Get rid of white-space around the ID. + # Get rid of leading '#' (number) mark, if present. + $id =~ s/^\s*#//; + # Remove whitespace $id = trim($id); - + # If the ID isn't a number, it might be an alias, so try to convert it. my $alias = $id; if (!detaint_natural($id)) { -- cgit v1.2.3-24-g4f1b