diff --git a/webtools/bugzilla/CGI.pl b/webtools/bugzilla/CGI.pl
index e51240e0b70..42b0c4af6da 100644
--- a/webtools/bugzilla/CGI.pl
+++ b/webtools/bugzilla/CGI.pl
@@ -1395,11 +1395,12 @@ Edit prefs
my $anynamedqueries = 0;
while (MoreSQLData()) {
my ($name) = (FetchSQLData());
+ my $disp_name = $name;
+ $disp_name =~ s/ / /g;
if ($anynamedqueries || $mybugslink) { $html .= " | " }
$anynamedqueries = 1;
- $name =~ s/ / /g;
$html .= "$name\n";
+ url_quote($name) . "\">$disp_name\n";
}
$html .= "\n";
} else {