Skip Menu |

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

Report information
The Basics
Id: 71754
Status: open
Priority: 0/
Queue: HTML-FillInForm

Owner: Nobody in particular
Requestors: hhaamu [...]

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

Subject: empty XHTML elements create malformed output
Date: Tue, 18 Oct 2011 13:29:54 +0300
To: bug-HTML-FillInForm [...]
From: hhaamu [...]
Download (untitled) / with headers
text/plain 1011b
When writing pure XHTML documents, you are allowed to shorthand <option></option> (i.e. option with an empty "label") as <option/>. These are not properly treated and result in malformed XML. The problematic result for the script below is: <option /="/" value=""> if the empty element is selected, the result is: <option /="/" value="" selected="selected"> The desired output would be: <option value="" selected="selected"/> Adding a space to the XHTML tag (as is recommended for parser compatibility; such as <br />) does not change the end result. There may be other tags that break this way, but I could not find any on a quick test. This is with HTML::FillInForm 2.1, HTML::Parser 3.68, running on Perl 5.12.4. Below is a simple test case: use HTML::FillInForm; my $html = <<'EOF'; <select name="sor"> <option value=""/> <option value="3">foo</option> <option value="5">bar</option> <option value="6">baz</option> </select> EOF my $q = { sor => 5 }; print HTML::FillInForm->fill( \$html, $q );
Subject: Re: [ #71754] empty XHTML elements create malformed output
Date: Tue, 18 Oct 2011 09:22:49 -0400
To: bug-HTML-FillInForm [...]
From: Mark Stosberg <mark [...]>
Thanks for the report!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to