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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC