Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips


I copyed a script from one article to another. Just a quick Ctrl-C, Ctrl-V, change a folder name, then preview without paying much attention. I did the copy in normal view.

I previewed and the script didn't work. When I looked at the pasted-to artcle again, I noticed that everything after the "{$foreach ... $}" was gone. In the HTML the "{$foreach ... $}" was followed by "<?XML:NAMESPACE PREFIX = CD /?>"

What is that?

Tuesday, March 09, 2004

I think the script stuff gets gobbled up by the normal view in its attempt to conform to xhtml.  Can you show the original script?

I think the safest way to include javascript in xhtml is to put it in a separate file and use the construct shown below

<script type="text/javascript" src="http://yourscripthere">

If you want it in your html code do this:
... unescaped script content ...

Here is a reference I googled

see section 4.8

joel goldstick
Tuesday, March 09, 2004

Or did I miss the point.  Are you talking about cdscript or javascript?

At any rate, how about posting the original?

joel goldstick
Tuesday, March 09, 2004

I wasn't javascripting. I was just pasting a Cityscript. That xml thing just appeared out of nowhere.

Tuesday, March 09, 2004

I have had the same - copying/pasting from {$.extra1$} (which made it difficult to figure out that there was some hidden HTML inside).

In that instance it was only a breadcrumbs type entry. The text in {$.extra1$} was something like

You are here: Home > Information Centre > Archives > {$.Headline $}

With Home, Info Centre etc. being the relevant link elsewhere. No script insight.

Manually looped through the articles deleting everything, then re-keying the text.

Wednesday, March 10, 2004

I'm not sure about it, but I believe CityDesk uses tags like that to preserve whitespace in your HTML. Afaik, you shouldn't see it though. In other words, it's a CD-bug.

Henrik Jernevad
Monday, March 15, 2004

Turned up again this morning immediately before an <a href> tag in the extra field.

The client found it (or rather reported that there was an error on the page). They had been copying and pasting chunks of MS Word content (tut tut tut, I've told you before) prior to copying the content of one of the extra fields from another article to this one.

Monday, March 15, 2004

*  Recent Topics

*  Fog Creek Home