cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Smith <>
Subject RE: Output escaping
Date Wed, 14 Feb 2001 06:06:11 GMT
We had a similar problem and found the following workaround.  I am assuming
that you are saving this xml packet into a database or something, and then
retrieving it later.  

When you save your xml packet, instead of saving tags as <i> and <b>, etc,
save them as something like <italic> <bold>, or use a namespace eg
<myproj:b>.  Then, in the xsp you get the data and include it into the page
using <util:expr>.  Finally, your xsl can replace the substituted tags for
the real html ones eg:

	<xsl:template match="bold">
		<b><xsl:value-of select="."/>

It takes a couple of steps, and your xml packets can't be viewed directly in
a browser, but it should get around the escaping problem.  This is the best
solution I have been able to come up with.  If anyone can think of a better
one, I'd love to hear it!


-----Original Message-----
From: Shaun Adolphson []
Sent: Wednesday, 14 February 2001 2:53 PM
To: ''
Subject: Output escaping

Hello all,

I know this is an old topic, but I have been throught all the mailing list
archives and still can't find an answer or away around not being able to use
disable-output-escaping. Yes I have read the faq, but I still need to find
away around it.  Any ideas or solutions would be great. Here are the details
and the description of the problem:

I am running Cocoon 1.8 on Redhat 6.2 with Tomcat. 

We are using a basic JavaScript HTML editor so that users can enter there
content in to there website. The editor allows them to use bold, italics,
underline, create a link,etc.  This content is saved into an XML packet
which is then sent to our servers where we are using Cocoon to process and
display the site.  The content needs to be escaped so that it is displayed
properly as currently it is just displaying the raw _escaped_ HTML

Some help would be greatly appreciated.



Shaun Adolphson
XWeb Pty Ltd

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message