Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 Expand Empty Elements and HTML

open
nobody
None
5
2012-10-08
2003-05-12
John Brayton
No

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
problem.

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.

Discussion

  • John Brayton
    John Brayton
    2003-05-12

    A patch to HTMLWriter.java

     
    Attachments