At the moment TWiki implements colour directives like %RED% with the <font> tag. But because HTML restricts the places font can appear, this can lead to malformed HTML being produced. For example the user might enter

<pre class="code">

Hello %RED% there %ENDCOLOR%.

</pre>

With TWiki 4.2.0, this generates a <font> inside the <pre> element, which is not permitted by the HTML DTD. The output is therefore malformed HTML. But if instead TWiki used <span style="font: #ff0000">, it would be legal HTML.

Since the <font> element is deprecated anyway it would be a good idea to move away from it towards <span style="..."> or <div style="...">.

I think this is a bug, not an enhancement, because of the malformed HTML currently being produced.

-- TWiki:Main/EdAvis - 28 Jan 2008

Currently the colours are defined in the DefaultPreferences topic. What negative and non compatible result could come out of changing to <span tags with CSS ?

-- TWiki:Main.KennethLavrsen - 28 Jan 2008

We've left the time of Netscape 4 support behind us, I think. But then even Netscape supported span color tags.

-- TWiki:Main.ArthurClemens - 28 Jan 2008

Yes, it should be safe to use: http://www.richinstyle.com/bugs/netscape4.html

-- TWiki:Main.ArthurClemens - 29 Jan 2008

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads