php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28880 Tidy's "clean" option does not convert font tags to style rules
Submitted: 2004-06-22 13:40 UTC Modified: 2004-10-11 17:14 UTC
From: nlopess@php.net Assigned: john (profile)
Status: Wont fix Package: Tidy (PECL)
PHP Version: 5.0.0RC3 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nlopess@php.net
New email:
PHP Version: OS:

 

 [2004-06-22 13:40 UTC] nlopess@php.net
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>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-11 17:09 UTC] john@php.net
This isn't a PHP issue, it is a bug in the Tidy library. Please file the report with tidy.sourceforge.net.
 [2004-10-11 17:14 UTC] nlopess@php.net
I already did a long time ago :)

http://sourceforge.net/tracker/index.php?func=detail&aid=976839&group_id=27659&atid=390963

They said:
"I would suggest you report this problem to the author of 
the wrapper you are using, they should be able to figure 
out what is wrong here, I can't really tell without looking at the code of the wrapper."

I also think this is a tidylib problem, but something could be hard-coded (like other options are)...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 12:01:27 2025 UTC