I am using [tidy](http://au.php.net/manual/en/book.tidy.php) to clean up and format the output of HTML generated by the [twig template engine](http://www.twig-project.org).

I am using the following configuration for tidy:

```
$config = array('indent' => TRUE, 'output-html' => TRUE, 'wrap' => 0);

```

Everything works nice and well, except when we get to textareas.

Here's the uncleaned fragment:

```
<textarea id="words"
         rows="10"       cols="50"                  >sdfds</textarea>

```

While the formatting is very messy, the correct value is outputted in the text area: 'sdfds' without any whitespace before or after.

This is the cleaned format after using tidy:

```
                <textarea id="words" name="words" rows="10" cols="50" title="prompt">
sdfds
</textarea>

```

As can be seen, the markup is much neater now, but tidy has introduced a linebreak after 'sdfds', which means that the cursor is now pointing at the line after 'sdfds' when viewed in the browser.

This is rather annoying, and I am not sure how to go about dealing with this. I would still want to have the textarea tag cleaned up, but I would prefer it to be formatted like so:

```
<textarea id="words" name="words" rows="10" cols="50" title="prompt">sdfds</textarea>

```

Has anyone dealt with this issue before? If so, How can I get tidy to not introduce those whitespaces for the textarea tag?