cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Reijn" <j.re...@hippo.nl>
Subject RE: Howto avoid masking of html in bizdata ?
Date Thu, 23 Aug 2007 12:09:25 GMT
Hi Andreas,

make sure that the sHtmlCode is a DOM (Document) object. Otherwise the jx template will interpret
it as text. (which is so in your case).

You can also let the XML be generated by a cocoon pipline.

So:

var pu = new Packages.org.apache.cocoon.components.flow.util.PipelineUtil;
var sHtmlCode = pu.processToDOM(String uri, Object viewData)

//Process a pipeline and gets is result as a DOM Document

I've done this out of my bare head, so I have not tested this code, but it should be correct.

Kind regards,

Jeroen Reijn


-----Original Message-----
From:	Andreas Duffner [mailto:a.duffner@Pripares.com]
Sent:	Thu 8/23/2007 12:07
To:	users@cocoon.apache.org
Cc:	
Subject:	Howto avoid masking of html in bizdata ?

Hi.
In my flowscript I have the following code:

var sHtmlCode = "<h1>This is an header</h1>";
cocoon.sendPage("the-end.jxt", {"vHtmlCode":sHtmlCode } );

The generated html-code looks like that:

&lt;h1&gt;This is an header&lt;/h1&gt;

So how do I avoid, that cocoon changes the "<" to a "&lt;" ?


-- 
Andreas Duffner
Software-Entwicklung


pripares GmbH
Maximilianstr. 5
82319 Starnberg

Tel  +49 (0)8151 99 888 - 26
Fax  +49 (0)8151 99 888 - 40
Mail  a.duffner@pripares.com

Tel  +49 (0)8151 99 888 - 0
Fax  +49 (0)8151 99 888 - 50
Mail info@pripares.com
Web  www.pripares.com

Handelsregister: Registergericht München HRB 138701
Sitz der Gesellschaft: Starnberg
Geschäftsführer: Aßmann Christoph, Ertl Andreas

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe dieser Mail und der darin enthaltenen Informationen
sind nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org





Mime
View raw message