E.17 TidyFilter
Prev | Appendix E. Core filters | Next

## E.17 TidyFilter

The `TidyFilter` allows you to use the PHP tidy extension to clean up and repair HTML documents. Usage example:

    <filterchain>
      <tidyfilter encoding="utf8">
        <config name="indent" value="true" />
        <config name="output-xhtml" value="true" />
      </tidyfilter>
    </filterchain>

Table E.11: Attributes for the `<tidyfilter>` tag

Name | Type | Description | Default | Required
--- | --- | --- | --- | ---
`encoding` | `String` | The expected input encoding of the file. | utf8 | No

### E.17.1 Nested tags

The `TidyFilter` supports nested <config> tags to configure how Tidy should manipulate the documents. For a complete list of configuration options see the offical Quick Reference.

Prev | Up | Next
E.16 TailFilter | Home | E.18 XincludeFilter