You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Matthieu Bollot <ma...@nereide.biz> on 2010/05/06 12:11:20 UTC

how to not escape an uiLabel in ftl

Hi,

I've got a label that contains :
<value xml:lang="fr">Réalisé</value>
and a ftl that contains :
${uiLabelMap.CameCESDone}

In the html source, i've got 
R&eacute;alis&eacute;
What I want is just Réalisé. This label will be used in a javascript
function, that's why I don't want it to be escaped.

I tried to unescape the label
${Static["org.apache.commons.lang.StringEscapeUtils"].unescapeHtml(uiLabelMap.CameCESDone)}
but it does not work… It seems that the java part in the ftl page is
escaped at the end.

Any idea ?


-- 
Matthieu BOLLOT
www.nereide.biz


Re: how to not escape an uiLabel in ftl

Posted by Matthieu Bollot <ma...@nereide.biz>.
Le jeudi 06 mai 2010 à 22:16 +1200, Scott Gray a écrit :
> ${StringUtil.wrapString(uiLabelMap.CameCESDone)}
That's it ! thank you so much :)


-- 
Matthieu BOLLOT
www.nereide.biz


Re: how to not escape an uiLabel in ftl

Posted by Scott Gray <sc...@hotwaxmedia.com>.
${StringUtil.wrapString(uiLabelMap.CameCESDone)}

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 6/05/2010, at 10:11 PM, Matthieu Bollot wrote:

> Hi,
> 
> I've got a label that contains :
> <value xml:lang="fr">Réalisé</value>
> and a ftl that contains :
> ${uiLabelMap.CameCESDone}
> 
> In the html source, i've got 
> R&eacute;alis&eacute;
> What I want is just Réalisé. This label will be used in a javascript
> function, that's why I don't want it to be escaped.
> 
> I tried to unescape the label
> ${Static["org.apache.commons.lang.StringEscapeUtils"].unescapeHtml(uiLabelMap.CameCESDone)}
> but it does not work… It seems that the java part in the ftl page is
> escaped at the end.
> 
> Any idea ?
> 
> 
> -- 
> Matthieu BOLLOT
> www.nereide.biz
>