php.net |  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
Votes:3
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
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: mlee at kanhan dot com
New email:
PHP Version: OS:

 

 [2004-06-19 17:01 UTC] mlee at kanhan dot com
Description:
------------
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:

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

And clean_ex1.html looks like this:

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

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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-19 21:52 UTC] john@php.net
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] john@php.net
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-2025 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 01:01:28 2025 UTC