|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28841 Tidy's "clean" option does not convert font tags to style rules
Submitted: 2004-06-19 17:01 UTC Modified: 2004-08-30 16:52 UTC
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: mlee at kanhan dot com Assigned: john (profile)
Status: Wont fix Package: Tidy (PECL)
PHP Version: 5.0.0RC3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mlee at kanhan dot com
New email:
PHP Version: OS:


 [2004-06-19 17:01 UTC] mlee at kanhan dot com
Supposedly Tidy should "strip out surplus presentational tags and attributes replacing them by style rules and structural markup as appropriate" if the "clean" option is set. For example:

    $conf = array("clean" => TRUE);
    $tidy = tidy_parse_file("clean_ex1.html", $conf);
    echo $tidy;

And clean_ex1.html looks like this:

	<FONT COLOR="red">Hello, World!</FONT><BR/>
	<B><FONT SIZE=4 COLOR=#c0c0c0>More Text...</FONT></B>

It seems that Tidy just removes the font tags without adding any style rules.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-19 21:52 UTC]
Currently in HEAD this actually segfaulting inside of libtidy itself. I'm not sure if this is a libtidy bug, or if the extension is doing something it shouldn't be. I'll look into it and see what I can dig up.
 [2004-08-19 15:47 UTC] ab at c dot de
any news on this bug? I am affected, as well
 [2004-08-30 16:52 UTC]
The segfault is fixed, however tidy is still not cleaning the HTML for this in the proper way. This isn't a bug in PHP, it's a bug in the libtidy library. Please foward this issue on to the developer's there to have it taken care of. Closing the bug.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Sep 27 02:05:53 2022 UTC