#28841 [Com]: Tidy's "clean" option does not convert font tags to style rules

From: Date: Thu, 19 Aug 2004 13:47:27 +0000
Subject: #28841 [Com]: Tidy's "clean" option does not convert font tags to style rules
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64933@lists.php.net to get a copy of this message
ID: 28841 Comment by: ab at c dot de Reported By: mlee at kanhan dot com Status: Assigned Bug Type: Unknown/Other Function Operating System: Windows PHP Version: 5.0.0RC3 Assigned To: john New Comment: any news on this bug? I am affected, as well Previous Comments: ------------------------------------------------------------------------ [2004-06-19 21:52:05] 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-06-19 17:01:51] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28841&edit=1

« previous php.bugs (#64933) next »