Subject: | Invalid HTML resulting from $cgi->scrolling_list(-default => ... ) |
Distribution name/version: CGI-2.13
Perl version: all; OS: all.
CGI.pm version 3.12 (released 04 Dec 2005) has introduced a bug in the scrolling_list routine. When setting the -default option, a missing space in the resulting HTML makes it invalid. Sample code:
#!/usr/bin/perl
# $Id$
use strict;
use warnings;
use CGI;
my $cgi = new CGI;
print $cgi->scrolling_list( -values => [qw/a b c/], -default => 'b' );
__END__
results in:
<select name="" size="3">
<option value="a">a</option>
<optionselected="selected" value="b">b</option>
<option value="c">c</option>
</select>
where a space should be inserted between "option" and "selected" in "optionselected" (invalid).
Patch attached.
Message body not shown because it is not plain text.