Subject: | HTML:Form does not handle "checked" attributes without an associated value. |
Date: | Thu, 14 Sep 2017 12:26:31 +1200 |
To: | bug-HTML-Form [...] rt.cpan.org |
From: | Andrew Maguire <andrew.maguire [...] catalyst.net.nz> |
Hi,
Parsing the following input elements with HTML::Form do not mark the
field with the checked value.
<input type="checkbox" name="c1" checked>
<input type="checkbox" name="c1" value="v1" checked>
Similarly for <option> elements, too.
I believe the fixes to HTML::Form (6.03) should be
In: sub new {
Line: 1165
$self->{current} = (exists $self->{checked}) ? 1 : 0;
delete $self->{checked};
Line: 1174
my $checked = exists($self->{checked}) || $self->{option_selected};
Thanks
Andrew Maguire