Subject: | Warns when control is outside form tag even though it is legal |
In the latest HTML::Form you have the ability to disable the warning
messages by not passing option verbose, however if you do it still
throws warnings if controls are found outside a form tag. This is legal
HTML for at a minimum HTML 4.01 Transitional. following test script
fails on warnings against a valid HTML 4.01 transitional page:
use strict;
use Test::More tests => 2;
use Test::NoWarnings;
use_ok('HTML::Form');
#Valid HTML
my $html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'
.'<html><head><title>No Warnings</title></head><body>'
."<select OnChange='location.href=\"index.php?"
."foo=\"+this.value'>"
."<OPTION value='bar'>bar</OPTION>"
."</body>";
#Shouldn't throw any warnings on valid HTML
my $form = HTML::Form->parse($html,'http://example.com');
Throws the following warning:
Carp::carp('<option> outside <form>') called at
/usr/local/lib/perl5/site_perl/5.6.1/HTML/Form.pm line 114
Perl 5.6.1 on FreeBSD 4.8-RELEASE-p17