That seems to be the correct config to symply tidy an HTML fragment (in a valid XHTML syntax) :
<?php
$tidy_config = array(
'clean' => true,
'drop-proprietary-attributes' => true,
'output-xhtml' => true,
'show-body-only' => true,
'word-2000' => true,
'wrap' => '0'
);
?>
Exemples
nicolas [at] adaka [dot] fr
25-Nov-2008 09:33
25-Nov-2008 09:33
dan [@t] authenticdesign [d_o_t] net
22-Aug-2008 05:44
22-Aug-2008 05:44
If you're just looking for a quick and dirty way to output HTML code you created in a formatted way use this technique...
<?php
$html = 'a chunk of html you created';
$config = array(
'indent' => true,
'output-xml' => true,
'input-xml' => true,
'wrap' => '1000');
// Tidy
$tidy = new tidy();
$tidy->parseString($html, $config, 'utf8');
$tidy->cleanRepair();
echo tidy_get_output($tidy);
?>
... This seemed to get the result I wanted every time.
