Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Replacement of & with & in hard links.

This is really annoying me, but perhaps it's just the overall process I'm currently working on.

I'm removing all of my downloadable content from CityDesk and instead using FTP to manage the files separately.  (CityDesk starts choking on files over 100Mb.  <g>)  As part of that process I wanted to begin tracking what files were downloaded so I could put them at the top of my list when I went and checked to ensure that I had the latest version.

My links now look like this inside CityDesk:
<td><a href="{ $x.extra1 }">{$ x.extra2 }</a></td>

(I pull the files, descriptions, etc, from Articles that aren't really articles but just a way of storing information.)

If I switch from HTML View to Normal View and back the ampersand in the above link gets replaced with &amp;.

This breaks my links.  I understand why it's done, and I'm not real sure I'd want to take on the task of fixing it, but I'm fairly certain that ampersands inside of <a> tags should be left alone. :)

Brian Schkerke
Sunday, September 14, 2003

My file size is 170 MB with more than 3,000 items.

I experience no 'choking' or any other problems when either uploading or downloading.

I run an internet newspaper in Scotland    which can be viewed by as many as 14,000 unique visitors a week.

Eddie Anderson
Sunday, September 14, 2003

Well, as of ten minutes ago my file size is 0Mb as I work to convert away from CityDesk.

Before that when I was actively managing files inside of CityDesk my filesize actually hit about 800Mb.  I was referring to CityDesk choking when you add a file over 100Mb in size to the database itself.

Brian Schkerke
Sunday, September 14, 2003

Long ago someone reported that CityDesk wasn't doing well with really big media files. Fog recommended that folks manage big files outside of CityDesk.

Sunday, September 14, 2003

Actually in an anchor tag, ampersands which separate arguments should be encoded as &amp.

The html will read http://blah/foo.asp?field=value&amp;field=value

When you hover over the link it will show as

When you click on the link, it will show in the address bar as

This is the expected behavior.

This type of expression is detailed in appendix B to the HTML 4
specification at , as

"B.2.2 Ampersands in URI attribute values

        The URI that is constructed when a form is submitted may be used as
an anchor-style link (e.g., the href attribute for the A element).
        Unfortunately, the use of the "&" character to separate form fields
interacts with its use in SGML attribute values to delimit character
        entity references. For example, to use the URI
"http://host/?x=1&y=2" as a linking URI, it must be written <A
        href="http://host/?x=1&#38;y=2"> or <A

Michael H. Pryor
Monday, September 15, 2003

Thanks for the explanation, Michael.

David Burch
Tuesday, September 16, 2003

*  Recent Topics

*  Fog Creek Home