Closed
Bug 104180
Opened 22 years ago
Closed 22 years ago
preset query footer broken for named queries containing spaces
Categories
(Bugzilla :: User Interface, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: mattdm, Assigned: kiko)
Details
(Keywords: regression)
Attachments
(1 file)
1.11 KB,
patch
|
jacob
:
review+
jacob
:
review+
|
Details | Diff | Splinter Review |
Doesn't happen at bugzilla.mozilla.org, but does with a just-tonight cvs update. Spaces in the urls of preset queries displayed in the footer are getting changed to   instead of %20, causing the links to break.
Reporter | ||
Comment 1•22 years ago
|
||
Taking the liberty of reassigning to justdave, as it seems to be his change (line 1400 in CGI.pl) that causes this. :)
Assignee: myk → justdave
Assignee | ||
Comment 2•22 years ago
|
||
This is my fault, too. Sorry, HTML compliance fixes. Okay, let me put you up to the decision: Originally, we used <NOBR> to wrapped around the bug name. This worked fine, but simply wasn't HTML compliant. To change this, there are two options (that I can see): a) Make space-separated names breakable, meaning they can wrap. b) Substitute space for I chose the second option, but didn't realize the problem it would cause in the receiving end. To fix that, you can apply this fix: --- buglist.cgi 2001/10/05 22:20:33 1.144 +++ buglist.cgi 2001/10/11 19:06:51 @@ -816,7 +816,9 @@ CMD: for ($::FORM{'cmdtype'}) { /^runnamed$/ && do { - $::buffer = LookupNamedQuery($::FORM{"namedcmd"}); + my $namedcmd = $::FORM{"namedcmd"}; + $namedcmd =~ s/ / /g; + $::buffer = LookupNamedQuery($namedcmd); $::querytitle = "Bug List: $::FORM{'namedcmd'}"; ProcessFormFields($::buffer); last CMD; But I am unsure this is the correct fix. I can remove the -ifying if we decide it's the best (I will _not_ break HTML compliance, however, so NOBR is out of the question).
Assignee: justdave → kiko
Comment 3•22 years ago
|
||
What not just do this? Index: CGI.pl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v retrieving revision 1.109 diff -u -r1.109 CGI.pl --- CGI.pl 2001/10/11 19:07:00 1.109 +++ CGI.pl 2001/10/11 19:19:26 @@ -1395,11 +1395,12 @@ my $anynamedqueries = 0; while (MoreSQLData()) { my ($name) = (FetchSQLData()); + my $disp_name = $name; if ($anynamedqueries || $mybugslink) { $html .= " | " } $anynamedqueries = 1; - $name =~ s/ / /g; + $disp_name =~ s/ / /g; $html .= "<A HREF=\"buglist.cgi?cmdtype=runnamed&namedcmd=" . - url_quote($name) . "\">$name</A>\n"; + url_quote($name) . "\">$disp_name</A>\n"; } $html .= "</TD></TR>\n"; } else {
Reporter | ||
Comment 4•22 years ago
|
||
whoop; collision. I was suggesting basically the same thing: --- CGI.pl.orig Thu Oct 11 15:21:01 2001 +++ CGI.pl Thu Oct 11 15:30:40 2001 @@ -1397,9 +1397,9 @@ my ($name) = (FetchSQLData()); if ($anynamedqueries || $mybugslink) { $html .= " | " } $anynamedqueries = 1; - $name =~ s/ / /g; + (my $nbspname = $name) =~ s/ / /g; $html .= "<A HREF=\"buglist.cgi?cmdtype=runnamed&namedcmd=" . - url_quote($name) . "\">$name</A>\n"; + url_quote($name) . "\">$nbspname</A>\n"; } $html .= "</TD></TR>\n"; } else {
Assignee | ||
Comment 5•22 years ago
|
||
Comment 6•22 years ago
|
||
Comment on attachment 53132 [details] [diff] [review] kiko_v1: stop being stupid about and HREF 3 patches that essentially do the same thing :) r=jake (once removing the last portion)
Attachment #53132 -
Attachment description: kiko_v1: stop being stupid about   and HREF → kiko_v1: stop being stupid about and HREF
Attachment #53132 -
Flags: review+
Comment 7•22 years ago
|
||
/cvsroot/mozilla/webtools/bugzilla/CGI.pl,v <-- CGI.pl new revision: 1.110; previous revision: 1.109 done Thanks to all involved :)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.16
Updated•11 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•