Skip Menu |

This queue is for tickets about the HTML-Form CPAN distribution.

Report information
The Basics
Id: 123036
Status: new
Priority: 0/
Queue: HTML-Form

People
Owner: Nobody in particular
Requestors: andrew.maguire [...] catalyst.net.nz
Cc:
AdminCc:

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



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
Subject: Re: [rt.cpan.org #123036] HTML:Form does not handle "selected" attributes without an associated value.
Date: Thu, 14 Sep 2017 12:51:00 +1200
To: bug-HTML-Form [...] rt.cpan.org
From: Andrew Maguire <andrew.maguire [...] catalyst.net.nz>
To handle the bare selected attribute in <option> elements, the line should be: my $checked = exists($self->{checked}) || exists($self->{option_selected}); Thanks Andrew Show quoted text
> 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
Subject: Re: [rt.cpan.org #123036] HTML:Form does not handle "selected" attributes without an associated value.
Date: Thu, 14 Sep 2017 13:02:23 +1200
To: bug-HTML-Form [...] rt.cpan.org
From: Andrew Maguire <andrew.maguire [...] catalyst.net.nz>
FYI: When testing this, I also found a parser issue if the <input> element was closed using />, e.g. <input type="checkbox" name="c1" checked/> This resulted in the HTML::Form::ListInput object having a key called 'checked/'. Andrew On Thu, 2017-09-14 at 12:51 +1200, Andrew Maguire wrote: Show quoted text
> To handle the bare selected attribute in <option> elements, the line > should be: > > my $checked = exists($self->{checked}) || > exists($self->{option_selected}); > > Thanks > Andrew >
> > 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
>