Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.3.2

Request #19097 HTML_QuickForm2 does not generate valid html
Submitted: 2011-12-02 23:16 UTC
From: ftzdomino Assigned: avb
Status: Closed Package: HTML_QuickForm2 (version 0.6.1)
PHP Version: 5.3.8 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2011-12-02 23:16 UTC] ftzdomino (Jon Snell)
Description: ------------ HTML_QuickForm2 generates empty tags and its ID values sometimes start with an underscore, which is not allowed. IDs should not be prefixed with _ and empty labels should either be omitted or filled with an   Test script: --------------- require("/usr/share/php/HTML/QuickForm2.php"); $f = new HTML_QuickForm2("form_name"); $f->addElement("checkbox", "test"); echo $f; Expected result: ----------------
Actual result: --------------

Comments

 [2011-12-03 06:39 UTC] doconnor (Daniel O'Connor)
 [2011-12-03 14:20 UTC] mansion (Bertrand Mansion)
Hi, I don't understand your bug report, what do you want exactly ? Furthermore, it seems you are trying to report 2 bugs in one. Please make one bug report per issue and provide the test case for your underscore issue as well. Thanks.
 [2011-12-03 15:37 UTC] avb (Alexey Borzov)
-Status: Open +Status: Analyzed
There is a valid report here that our autogenerated IDs start with underscores, this is not allowed in XHTML. I already had that one reported privately. As for empty <label></label> tags, this can be easily fixed if one sets up custom templates for label-less elements. So this is more a documentation problem, see also bug #18787 for example.
 [2012-02-20 01:31 UTC] avb (Alexey Borzov)
-Status: Analyzed +Status: Assigned -Assigned To: +Assigned To: avb
Clarification: IDs starting with underscores are allowed in XHTML but disallowed in HTML4. These are fixed in SVN. I'm not sure where exactly are empty label tags disallowed, though. Will do some more checks.
 [2012-02-28 23:26 UTC] avb (Alexey Borzov)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. -- Added a paragraph tag and a template block around label, this will allow removing empty label tags without breaking layout.