|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-07-16 09:10 UTC] saran at inra dot co dot th
Description:
------------
Tidy's "enclose-block-text" option doesn't works. It should insert a <p> element to enclose any text it finds in any element that allows mixed content. In example below it should insert a <p> element to enclose text inside a <td> element (as tidy.exe did with this same option set to true).
Reproduce code:
---------------
<?
$html="
<html>
<body>
<table>
<tr>
<td>Test</td>
</tr>
</table>
</body>
</html>
";
$config=array('enclose-block-text'=>1);
$tidy=tidy_parse_string($html,$config);
echo tidy_get_body($tidy);
?>
Expected result:
----------------
<body>
<table>
<tr>
<td><p>Test</p></td>
</tr>
</table>
</body>
Actual result:
--------------
<body>
<table>
<tr>
<td>Test</td>
</tr>
</table>
</body>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
This is being tested with 'libtidy June 1 2004' Here is some code that should show that the config is being passed: <?php $html="<html> <body> <span>text</span> <table><tr><td>Test</td></tr> </table> </body></html> "; // with config $config=array('enclose-block-text'=>1); $tidy=tidy_parse_string($html,$config); echo tidy_get_body($tidy); // without config $config=array('enclose-block-text'=>0); $tidy=tidy_parse_string($html,$config); echo tidy_get_body($tidy); ?>