From:             [EMAIL PROTECTED]
Operating system: all
PHP version:      5CVS-2004-06-22 (dev)
PHP Bug Type:     Unknown/Other Function
Bug description:  Tidy generate bogus xhtml

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 bug report at http://bugs.php.net/?id=28880&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28880&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28880&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28880&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28880&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28880&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28880&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28880&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28880&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28880&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28880&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28880&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28880&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28880&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28880&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28880&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28880&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28880&r=float

Reply via email to