XTHML formatting bug

Are you missing a feature? Request its implementation here.
Ed Rayl

XTHML formatting bug

Post by Ed Rayl »

I have just started playing with the 3.1 Eclipse plugin. When formatting XHTML documents, there is one serious problem: all browsers will fail to render

<textarea/>

correctly. It cannot be written as an empty element. It must be rendered:

<textarea></textarea>

It you don't do this, the browser will display all the raw HTML code inside the text area that is below the empty <textarea/>. Since it is VERY typical to have nothing between these elements, Oxygen is modifying my document to the empty element.

On another note, many old browsers cannot properly display an empty element such as:

<hr/>

and they simply ignore them. By changing this to:

<hr />

the problem is avoided. Again, Oxygen is modifying my document on reformat and removing the space between the element name and the slash. Even when empty elements are not going to be displayed in a browser, I now find I like the space anyway because it makes empty elements easier to locate.

You will also find that <script/> and <style/> as empty elements can cause problems in many browsers.

Could you please look into fixing these problems. While you might technically argue that this is not a bug, it still causes me pain. I don't want to use the "expand empty elements" checkbox, when only one XHTML element is affected.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

In order to keep script, style, textarea, etc. as they are you can add them in the "Preserve space elements" list in the Options->Preferences -- Editor/Format dialog.

Best Regards,
George
Post Reply