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

Bug #1850 HTMLtoXHTML.php does not produce XHTML
Submitted: 2004-07-12 07:14 UTC
From: ignatius dot reilly at free dot fr Assigned: dufuz
Status: Closed Package: XML_HTMLSax3
PHP Version: 4.3.7 OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-12 07:14 UTC] ignatius dot reilly at free dot fr
Description: ------------ I tried to run the HTMLtoXHTML.php example, without success, except on the simplest XML fragments. Reproduce code: --------------- For example: the page http://www.auderghem-analytica.com/main/en/sect1/p100 is XHTML However, the script returns NOT XHTML. Problems with empty tags: <img>, <input> which apparently are not "closed" by the parser. Expected result: ---------------- For example, one would expect: <img src="/images/aa/layout/spacer.gif" width="1" height="1" /> Actual result: -------------- But one gets: <img src="/images/aa/layout/spacer.gif" width="1" height="1">

Comments

 [2005-02-22 11:26 UTC] b dot clot at adverline dot com
Hi, In fact the bug seems related to the fact that HTMLSax3, at least in its latest release, doesn't detect self-closing tags and therefore tries to close them... Is a fix considered? Thanks, Benjamin.
 [2006-04-14 19:45 UTC] edwardzyang at thewritingpot dot com (Edward Z. Yang)
HTMLtoXHTML.php really is just a proof of concept, I don't think by any means it was meant to be comprehensive. Besides not closing self-closing tags, it also doesn't check the nesting of tags or the attributes.
 [2007-12-01 22:00 UTC] dufuz (Helgi Þormar Þorbjörnsson)
This bug has been fixed in CVS. 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.