Search

I’ve browsed the forum but I can’t find any guidelines considering this problem. I am setting up Symphony as a backend for full-Flash sites. All templates give XML output. Now I have certain textarea fields that are marked up using the TinyMCE editor. What I would like to do is to put the contents of these fields in CDATA. For example; I have a textarea field called Description. The ouput I get is

<description>
<h1>Some heading</h1>
<p>Some paragraph text</p>
</description>

And I want it wrapped in CDATA such as:

<description>
<![CDATA[
<h1>Some heading</h1>
<p>Some paragraph text</p>
]]>
</description>

Any hints on how to achieve this with XSLT? Thank you!

How about the cdata-section-elements element on your xsl:output element:

http://www.bernzilla.com/2008/02/12/utilizing-cdata-section-elements-in-xsl/

Might do the trick.

@nickdunn thank you for the response; I’ve tried that but for some reason that does not work as expected. I am not sure what I’m missing here.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details