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

Alessandro Magnolo alessandro.magnolo at gmail.com
Fri Nov 4 10:12:50 CET 2005


On 10/22/05, Alexander Kandzior <alex at opencms.org> wrote:
> > 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)

Thanks for the hints, Alexander.

Here's the solution for anyone should need it:

<c:set var="titolo"><cms:contentshow element="Titolo" /></c:set>

<a href="<cms:link><cms:contentshow element="${opencms.filename}"
/></cms:link>"
title="<c:out value="${titolo}" />">show</a>


Alessandro Magnolo



More information about the opencms-dev mailing list