[opencms-dev] How to escape HTML for cms:contentshow

Alexander Kandzior alex at opencms.org
Sat Oct 22 11:43:55 CEST 2005


> Is there a way to escape an XML content string?
> What I'd like is something similar to the cms:property 
> escapeHtml parameter.

This is not possible as a build in function. However, you could certainly
use another taglib for this (it's likley possible with the JSTL somehow) The
code would look like this:

<somelib:someTagCommandThatExcapesItsBodyContent>
<cms:contentshow element="MyElementName" />
</somelib:someTagCommandThatExcapesItsBodyContent>

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of 
> Alessandro Magnolo
> Sent: Friday, October 21, 2005 5:15 PM
> To: The OpenCms mailing list
> Subject: [opencms-dev] How to escape HTML for cms:contentshow
> 
> Is there a way to escape an XML content string?
> What I'd like is something similar to the cms:property 
> escapeHtml parameter.
> 
> i.e., with cms:property you can write:
> <cms:property name="Keywords" escapeHtml="true" />
> 
> While the following is not valid:
> <cms:contentshow element="MyElementName" escapeHtml="true" />
> 
> How can I escape the element content?
> 
> thank you
> Alessandro Magnolo
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 




More information about the opencms-dev mailing list