summaryrefslogtreecommitdiff
path: root/ext/tidy/examples/cleanhtml.php
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tidy/examples/cleanhtml.php')
-rw-r--r--ext/tidy/examples/cleanhtml.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/tidy/examples/cleanhtml.php b/ext/tidy/examples/cleanhtml.php
index c949a0cfc2..9d054cda4f 100644
--- a/ext/tidy/examples/cleanhtml.php
+++ b/ext/tidy/examples/cleanhtml.php
@@ -12,26 +12,24 @@
*
*/
- $tidy = tidy_create();
-
if(!isset($_SERVER['argv'][1])) {
$data = file_get_contents("php://stdin");
- tidy_parse_string($tidy, $data);
+ tidy_parse_string($data);
} else {
- tidy_parse_file($tidy, $_SERVER['argv'][1]);
+ tidy_parse_file($_SERVER['argv'][1]);
}
- tidy_clean_repair($tidy);
+ tidy_clean_repair();
- if(tidy_warning_count($tidy) ||
- tidy_error_count($tidy)) {
+ if(tidy_warning_count() ||
+ tidy_error_count()) {
echo "\n\nThe following errors or warnings occured:\n";
- echo tidy_get_error_buffer($tidy);
+ echo tidy_get_error_buffer();
echo "\n";
}
- echo tidy_get_output($tidy);
+ echo tidy_get_output();
?>