Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

The HTML editor *still* messes up my code

First, I'm delighted to see the evolutionary improvements in CityDesk. Thank you!

The editor is much improved with the syntax highlighting.

However, I like to work in XHTML. I *had* thought the editor element was fixed, because I could copy all the text, convert the tags to XHTML, paste it back in and edit it without anything horrid happening - not the case with the old editor.

BUT if I view the resultant page in 'normal' all the tags are converted back to upper case and the XHTML elements stripped.

Steps to reproduce:

1. Create a page in HTML view with lower case tags and some XHTML tags (eg <br />) - edit, insert - all fine

2. View the page in 'normal' view (no changes made)

3. View the page in HTML view again. All tags upper-cased and <br /> etc. changed to <BR> etc.

NOT good. Editors should not change code without permission.

Interestingly, some tags *don't* get changed - the following snippet was originally all lower-case tags:

<P class=c1><SPAN class=firstwords>The island of Menorca</SPAN> is one of the <EM>Balearic Islands</EM>, in the Western Mediterranean.<IMG title="The islands of the Balearics" height=150 alt="The islands of the Balearics" src="PTMFOG0000000055.jpg" width=272 align=right>

However *even nastier things* are happening here - note how the quoted values have had their quotation removed: the original snippet is:-

<p class="c1"><span class="firstwords">The island of Menorca</span> is one of the <em>Balearic Islands</em>, in the Western Mediterranean.<img title="The islands of the Balearics" height="150" alt="The islands of the Balearics" src="PTMFOG0000000055.jpg" width="272" align="right" />

Thus the editor is invalidating valid code. Oops!


James Roberts
Wednesday, May 7, 2003

Obviously, instead of "All tags upper-cased" I meant to say "*Nearly* All tags upper-cased".


James Roberts
Wednesday, May 7, 2003

Uppercase tags are NOT the correct way to write tags. The browser has to change all uppercase tags to lowercase before executing them. The uppercase way is just a preferred way that some people seems to like. In theory your code executes faster if you use all lowercase, but of course this is seldom a problem these days.

I would prefer if CD would leave my code alone completely or at least ask before making any "improvements".

Jorgen Brenting
Wednesday, May 7, 2003

I've never read anywhere that CityDesk supported XHTML.  I do prefer XHTML, but I've never expected it to support it.  In my view the control is validating the code and changing it to valid HTML.  Is this not the case?

David Burch
Sunday, May 11, 2003

*  Recent Topics

*  Fog Creek Home