Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

HTML/Normal View Issue?

I've a strange behaviour when changing from an article's HTML View to Normal View and back again. To reproduce it, follow these steps:

1. Create a new article and open it for editing.
2. Type a few paragraphs of junk.
3. Switch to HTML View, and type "£" and "°" somewhere in the text.
4. Switch to Normal View. The pound and the degree symbols display as you'd expect.
5. Switch to HTML View. The text "£" and "°"  has been replaced by the pound character and the degrees character.

It's not causing me any problems, but it seems a little unusual (since "&", "<", etc don't get converted). I don't know if it's an issue, but I thought you Fog Creek guys might be interested.

Darren Collins
Sunday, February 03, 2002

I had run accross a similar problem. Typing & in the HTML view, switching to Normal view and back again reveals the HTML code "&"

This could become a headache when linking to Lotus Notes Dominio servers that require an & without the amp; attached to it.

Mark W
Monday, February 04, 2002

You've probably seen this, maybe it's related:

http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=1320&ixReplies=11

tk
Monday, February 04, 2002

It is a part of the HTML standard that ampersands anywhere must be encoded as &.

It is common for URLs to require &, as in:
http://www.site.com?a=1&b=2

The correct way to encode a link to this URL in HTML is
<a href="http://www.site.com?a=1&amp;b=2">

The &amp; is required by HTML but the actual URL that is requested when you click the link will only have an &.

As for pounds and degrees -- I think what's going on is that since you are using a character set that includes these characters, it is safe to embed them directly in the HTML. If you were using a different character set that did not have a way to represent them, you would have to use entities.

Joel Spolsky
Monday, February 04, 2002

Yeah, but the problem I'm talking about is that *CityDesk* changes the entities into special characters when you change views. What happens when the article gets published, if the character set I assign to <p> elements doesn't recognise those special characters? Shouldn't CityDesk leave the entities alone instead of converting them?

Darren Collins
Monday, February 04, 2002

yep, i hear ya, we'll check into it.

Joel Spolsky
Monday, February 04, 2002

Links with &amp; tend to break when published. This is a longstanding issue we've had with Dreamweaver, where, if you code the link in the properties window it turns all the &'s into &amp;. Those of us who do most of the coding of these types of links know about this problem, but now that CityDesk will be turned over to the less technical users, they'll have to learn about this too. Also, since CityDesk doesn't instantly take you to the location you were in when you switch from Normal to HTML view, you have to hunt for it.

Mark W
Monday, February 04, 2002

*  Recent Topics

*  Fog Creek Home