roxen.lists.roxen.general

Subject Author Date
Re: XHTML in Roxen CMS published content Jonas_Walldén <jonasw[at]roxen[dot]com> 03-10-2006
[If readers of this list object to CMS-related topics, feel free to  
say so. There is a separate Roxen CMS list for anyone with a Roxen  
Support extranet account that we can use instead.]

Michael D. Muzzie <<mdmuzzie[at]Princeton.EDU>> wrote:

> During our transition from Roxen 4.0 to Roxen 4.5, we have been
> concentrating on establishing a stable, simple foundation for future
> templates. One area we are concentrating on is trying to generate
> valid XHTML code.
>
> Roxen CMS version 4.5 uses FCKEditor 2.2, which is quite nice and
> quite customizable (once you figure out /roxen-files/cms-templates/
> cms-fckconfig.js). The Java applet substitute for Safari, on the
> other hand, is not so nice, and we are recommending that our content
> editors user Firefox, Camino, IE.

The Java applet is indeed bad but until Apple improves Safari we have  
no other option. Here are two links where you can track the Safari/ 
FCKEditor compatibility effort:

   http://bugs.webkit.org/show_bug.cgi?id=9915
   http://www.fckeditor.net/safari/

By the way, we're updating to FCKEditor 2.3.1 for the next  
maintenance release so you'll see clear improvements in loading speed.

> Anyway, the code FCKEditor generates is relatively clean. The code
> that is saved to the flat files maintains their <strong> tags, <em>
> tags, self-closing <br /> tags, etc (unless they are opened up and
> saved with that awful Java editor for Safari). However, when the
> content is transformed by templates into actual pages, those tags are
> turned into HTML 4 tags (<b>, <i>, <br>, etc.).
>
> We have been all through the templates and have been unable to find
> where that transformation is taking place.

The filtering actually takes place when the page is saved, not when  
XSLT is applied. The filter code can be found in server-x.x.x/modules/ 
sitebuilder/pike-modules/Sitebuilder.pmod/AppFilter.pmod. Look for  
"class FCKFilter" and you'll see the conversion table a few lines below.

The reason this was implemented in the first place was to preserve  
compatibility with installations that use the Java applet alongside  
the newer editor.

> Has anyone else bothered with (and/or solved) this problem?

Yes! 4.5-release2 will let you define custom FCKEditor filters  
without resorting to product patches. Just subclass the FCKFilter  
class to alter this behavior. (I don't have a release date to  
announce, but real soon...)

Regards,

-- Jonas Walldén
    <jonasw[at]roxen.com>