I was running into problems where, when writing HTML, an empty
textarea tag would be written as <textarea... /> rather than <textarea
... ></textarea>. I see that the caller can generate an OutputFormat
with expandEmptyElements set to true, which works around this
However, this is not done for the default HTMLWriter OutputFormat.
Also, in dom4j 1.3, if the caller generated his/her own OutputFormat,
empty textarea tags would get expanded even if the caller did not
manually set expandEmptyElements.
Therefore, I believe that the most correct fix is to update
HTMLWriter.writeEmptyElementClose(String) so that empty tags are
always expanded if the output format is not XHTML. I have attached a
patch for this change.