Configurações corretas biblioteca Tidy
Olá gente.
Aos mais familiarizados com com a biblioteca tidy, pergunto à vocês se estão corretas estas configutações abaixo:
PHP 4
$Saida = ob_get_contents();
ob_end_clean();
$Tidy = tidy_set_encoding('latin1');
$Tidy = tidy_setopt('indent', true);
$Tidy = tidy_setopt('indent-spaces', 1);
$Tidy = tidy_setopt('wrap', 300);
$Tidy = tidy_setopt('output-xhtml', true);
$Tidy = tidy_parse_string($Saida);
$Tidy = tidy_clean_repair();
$Tidy = tidy_get_output();
echo $Tidy;
PHP 5
$fileContents = ob_get_clean();
$params = array ('indent' => true, 'output-xhtml' => true, 'wrap' => 300);
$tidy = new tidy;
$tidy = tidy_parse_string($fileContents, $params, 'latin1');
$tidy -> cleanRepair();
echo $tidy;
Ambas estão funcionando corretamente, somente quero ver se estão devidamente configuradas.
Obrigado.
Discussão (1)
Carregando comentários...