Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 18408
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: LDS [...] cpan.org
Requestors: fenlisesi [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: popup_menu value="..." needs space after attribute list.
I would like to suggest the following patch to 3.16: --- CGI.pm.patched 2006-03-28 15:09:13.000000000 +0300 +++ CGI.pm.original 2006-03-01 00:39:29.000000000 +0200 @@ -2395,7 +2395,7 @@ $label = $labels->{$_} if defined($labels) && defined($labels->{$_}); my($value) = $self->escapeHTML($_); $label=$self->escapeHTML($label,1); - $result .= "<option $selectit${attribs} value=\"$value\">$label</option>\n"; + $result .= "<option $selectit${attribs}value=\"$value\">$label</option>\n"; } } in order to get a space between the attributes and the value. Sample output from 3.16: <option disabled="disabled"value="eenie"> The same tag after the patch: <option disabled="disabled" value="eenie"> $CGI::revision = '$Id: CGI.pm,v 1.200 2006/02/08 18:28:54 lstein Exp $'; $CGI::VERSION='3.16'; charm # perl -v This is perl, v5.8.8 built for i686-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. charm # uname -a Linux charm 2.6.11.4-21.11-default #1 Thu Feb 2 20:54:26 UTC 2006 i686 i686 i386 GNU/Linux thanks for all the good stuff. __Ali ISIK__
I cannot reproduce this bug in version 3.17. If you feel that it is still broken, please post a script that reproduces the bad behavior.
From: Ali ISIK
On Tue Mar 28 10:32:48 2006, LDS wrote: Show quoted text
> I cannot reproduce this bug in version 3.17. If you feel that it is > still broken, please post a script that reproduces the bad behavior.
Hi, Lincoln, I get the same output with 3.17, as seen in the interaction below. The problem tag is <option disabled="disabled"value="1">: charm # cat ./popup.pl #!/usr/bin/perl -wT use strict; use warnings; use CGI; my @values = qw/ 0 1 2 3 /; my %labels = ( 0 => 'thou still', 1 => 'unravished', 2 => 'bride', 3 => 'of quietness', ); my %attributes = ( 1 => { disabled => 'disabled' } ); print CGI -> popup_menu( -name => 'stanza', -values => \@values, -default =>'0', -labels => \%labels, -attributes => \%attributes, ) . "\n"; charm # ./popup.pl <select name="stanza" > <option selected="selected" value="0">thou still</option> <option disabled="disabled"value="1">unravished</option> <option value="2">bride</option> <option value="3">of quietness</option> </select> charm # perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.11.4-21.11-default, archname=i686-linux-thread-multi uname='linux charm 2.6.11.4-21.11-default #1 thu feb 2 20:54:26 utc 2006 i686 i686 i386 gnulinux ' config_args='-des -Dusethreads -Doptimize=-g -Dusedevel' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE Linux)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Feb 28 2006 21:34:43 @INC: /usr/local/lib/perl5/5.8.8/i686-linux-thread-multi /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl . charm # uname -a Linux charm 2.6.11.4-21.11-default #1 Thu Feb 2 20:54:26 UTC 2006 i686 i686 i386 GNU/Linux charm # __Ali ISIK__
From: fenlisesi [...] gmail.com
Please close this ticket. I just tried this with 3.23 and it seems to be fixed, probably much earlier. __Ali ISIK__
Fixed in version 3.20.