tidy_repair_string

(no version information, might be only in CVS)

tidy_repair_string --  Repair a string using an optionally provided configuration file

Description

bool tidy_repair_string ( string data [, string config_file [, string encoding]])

This function repairs the given string.

Example 1. tidy_repair_string() example

<?php
ob_start
();
?>

<html>
  <head>
    <title>test</title>
  </head>
  <body>
    <p>error</i>
  </body>
</html>

<?php

$buffer
= ob_get_clean();
$tidy = tidy_repair_string($buffer);

echo
$tidy;
?>

The above example will output:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>test</title>
</head>
<body>
<p>error</p>
</body>
</html>

See also tidy_parse_file(), tidy_parse_string() and tidy_repair_file().

Note: The optional parameters config_options and enconding were added in Tidy 2.0.