Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Bug with HTML <code> tag

The HTML view of an article flags <code> and </code> in red, indicating that they are invalid. They're not, <code> is a valid tag in HTML and XHTML.

Julian M Bucknall
Thursday, August 21, 2003

Julian,

I have to ask, does the phrase "Algorithms Alfresco" mean anything to you?

John Topley (wwwljohntopley.com)
Thursday, August 21, 2003

Add CODE to Elements.rw with a text editor and you'll be all set.

We'll do this ourselves in a future release. Thanks!

Joel Spolsky
Thursday, August 21, 2003

Is there a similar trick to get CityDesk to not remove an unknown tag when switching between normal view and html view ? Like, say I want to use a <sourcecode> tag for marking text for an external program that I run before publishing ?

Lasse Vågsæther Karlsen
Thursday, August 21, 2003

John

Uh huh, could be <g>. It might make a return once Borland get Delphi for .NET out. At the moment it's problematic continuing with it being at MS in the C# team 'n' all.

Julian M Bucknall
Friday, August 22, 2003

Joel

Done. It works. Oh, it's a beautiful thing when you can alter the behavior of an app through a simple text file.

Julian M Bucknall
Friday, August 22, 2003

Julian,

The name rang a bell and I just wanted to check if it was you!

John Topley (www.johntopley.com)
Friday, August 22, 2003

Lasse: the elements.rw and attributes.rw files only affect the source syntax coloring. Any other custom tags you add are removed during the html -> xhtml cleanup step, and that is not customizable, but we'll consider that for a future release.

In the meantime and for compatibility sake, I would recommend using styles or ids and not custom tags when you want to flag something in your text and have the flag not get lost. For example instead of <sourcecode>...</sourcecode> you could use <span id="sourcecode">....</span> or <span class="sourcecode">...</span>. It's a little harder to find, later, but it will be preserved. Another possibility is to use a comment:
<!--STARTSOURCECODE--> ... <!--STOPSOURCECODE-->

Joel Spolsky
Friday, August 22, 2003

Good idea. I was hijacking the <code> tag for my purposes, but I will be changing this code in my program to use a span or div instead, along with a very specific class type.

Lasse Vågsæther Karlsen
Friday, August 22, 2003

*  Recent Topics

*  Fog Creek Home