Tidy Tool

" />
Errors and warnings:"; $html = trim($_GET[html]); $html = file_get_contents($html); $tidy = tidy_parse_string($html); $tidy->CleanRepair(); $tidy->diagnose(); $output = tidy_get_error_buffer($tidy); $output = htmlentities($output); $output = nl2br($output); $output = str_replace( "
", "

", $output); $output = str_replace( "Warning:", "Warning:", $output); $output = preg_replace( "#(line \d+ column \d+)#", "$1", $output); echo "$output"; echo "

"; echo "

Cleaned HTML

"; echo "
"; echo ""; echo "
"; } else { echo "
\n

Enter a URL. HTML errors will be listed and repaired.
\n
"; } ?>