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
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:
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

Add a Patch

Pull Requests

Add a Pull Request

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