Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Bug: build-in HTML viewer edits HTML source code.

When I put an existing HTML page (body) in an article in HTML View mode and publish the page right away without viewing the page in Normal View, I get the desired result.

But when I view the same page in Normal View mode, the build-in viewer changes the HTML! Publishing this pages results in a mess!

An example:
I am studying the feasibility using CityDesk to maintain html pages in an existing web application. The web application uses Netscape Application Server 4.0 (I know, I know: ancient technology). The application server uses < gx >< /gx > tags to fill the HTML page with dynamic content.

Following a part of the original, working HTML page:

<table border=0 cellPadding=0 cellspacing=1 width="608">
<gx type=tile id=Bill>
<gx type=tile id=BXStatement>
    <tr id=r<gx type=cell id=Statement.sumid></gx> class=unselrow bgcolor="#F4F4FF">
        <td width="17" valign="center" align="center"><INPUT TYPE="CHECKBOX" NAME="sumid" VALUE="<gx type=cell id="Statement.sumid></gx>" onClick="rowCheck(<gx type=cell id=Statement.sumid></gx>)"></td>
        <td width="58" valign="center">&nbsp;<gx type=cell id=Statement.billdate></gx></td>
    </tr>
    </gx>
    </gx>
</table>

This is what the CityDesk built-in viewer makes from the above html code:

<TABLE border=0 cellPadding=0 cellSpacing=1 width=608>
<TBODY>
<GX id=Bill type="tile">
<GX id=Statement type="tile">
<TR id="r<gx" type="cell"></GX>class=unselrow bgcolor="#F4F4FF"&gt;
<TD align=middle vAlign=center width=17>
<INPUT name=sumid type=checkbox value="<gx type=cell id=" Statement.sumid></GX>" onClick="rowCheck(<GX id=Statement.sumid type="cell"></GX>)"&gt;</TD>
<TD vAlign=center width=58>&nbsp;<GX id=Statement.billdate type="cell"></GX></TD>
</TR></GX></GX></TBODY></TABLE>


Please, notice differences in the <TR> tag.

Questions:
1) Is there a work around for this problem so non technical people can take over the regular maintenance using the Normal View mode? For example, is it possible by default to open the articles in an external HTML viewer/editor.
2) Is it possible to switch off the HTML code ‘optimalizer’, in order not to change the HTML code, while working in the Normal View?

Johan Koerts
Thursday, March 21, 2002

That's not an HTML viewer, it's an WYSIWYG HTML editor. A very bad one.

The simple work-around for the time being is to never switch to HTML view.

Brad Wilson
Thursday, March 21, 2002

I meant, "never switch to normal view". You're already in HTML view. *smacks head*

Brad Wilson
Thursday, March 21, 2002

I don't know how we'll ever be able to handle things that are basically malformed HTML such as:

<tr id=r<gx type=cell id=Statement.sumid>

This is invalid HTML because nested tags (< inside a tag) are specifically not permitted. I know, I know, your system pulls out those <gx>'s before they get to the web browser.

Unfortunately if you have HTML that is syntactically incorrect, there is no good way to show it in WYSIWYG mode... and when we convert it back to HTML, you're not going to get very good results. I don't know of any WYSIWYG editor that deals well with invalid HTML.

Joel Spolsky
Thursday, March 21, 2002

But wait! I didn't even answer your question, which was, how to make it so people editing the content don't cause CityDesk to mess up the HTML.

You should try to find a way to get all the "funny" HTML into a template. The only thing people should be editing in Normal View is the body text. If you can keep the weird stuff in templates and the normal stuff in articles, you can just turn off designer mode and users will be able to edit articles as-is.

Joel Spolsky
Thursday, March 21, 2002

malformed HTML? Thanks Joel!
But yes, you are right: nested tags is the problem. In fact, I need to produce HTML templates with these <gx> tags in it, which the sytem will pick up and spit out as HTML.

To move the 'weird stuff' in templates and the 'normal' stuff in articles, I need the possibility of more bodies per template. Has this been provided?

Johan Koerts
Friday, March 22, 2002

Use the "extra" fields, like "Extra1", "Sidebar", "Teaser", etc.  They're all WYSIWYG HTML editors, although not as easy to use for some things as the main body field is.

Phillip J. Eby
Friday, March 22, 2002

*  Recent Topics

*  Fog Creek Home