php8.5
Home/ Manual/ tidy / tidy/ tidy::cleanRepair

tidy::cleanRepair

PHP function Edit on GitHub ✎

Execute configured cleanup and repair operations on parsed markup

Description

Oop

tidy::cleanRepair(): bool

Procedural

tidy_clean_repair(tidy $tidy): bool

This function cleans and repairs the given tidy tidy.

Parameters

tidy

Object

Return Values

Success

Examples

tidy::cleanrepair() example

php
<?php
$html = '<p>test</I>';

$tidy = tidy_parse_string($html);
$tidy->cleanRepair();

echo $tidy;
?>

The above example will output:

output
<html>
<head>
<title></title>
</head>
<body>
<p>test</p>
</body>
</html>

See Also

Source: reference/tidy/tidy/cleanrepair.xml · from the official PHP manual (php/doc-en)