ID: 28880 Updated by: [EMAIL PROTECTED] -Summary: Tidy generate bogus xhtml Reported By: [EMAIL PROTECTED] -Status: Open +Status: Wont fix Bug Type: Unknown/Other Function -Operating System: all +Operating System: Windows -PHP Version: 5CVS-2004-06-22 (dev) +PHP Version: 5.0.0RC3 -Assigned To: +Assigned To: john New Comment:
This isn't a PHP issue, it is a bug in the Tidy library. Please file the report with tidy.sourceforge.net. Previous Comments: ------------------------------------------------------------------------ [2004-06-22 13:40:19] [EMAIL PROTECTED] Description: ------------ Tidy is defaulting output-xhtml to 0, thus generating bogus xhtml. (note the difference between <br> and <br />) Reproduce code: --------------- <? $xhtml = <<< HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <body> <p>test<br /> test </p> </body></html> HTML; $tidy = tidy_parse_string($xhtml); $tidy->CleanRepair(); echo $tidy; ?> Expected result: ---------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> </head> <body> <p>test<br /> test</p> </body> </html> Actual result: -------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title></title> </head> <body> <p>test<br> test</p> </body> </html> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28880&edit=1
