You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zsolt <zk...@intland.com> on 2006/03/09 12:35:42 UTC

Hi,

I use struts-1.2.8 and wan't to special html patterns (for example &gt;) in
title of <html:link. Is that correct, that I have to escape those
characters?

Right now I use:

<c:set var="linkTitle">
	<c:out value="${latestNews.subject}" />
</c:set>

<html:link title="${linkTitle}" href="${link}">
	<c:out value="${subject}" />
</html:link>

Is there a better way?

Zsolt




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Posted by Zsolt <zk...@intland.com>.
escapeXml="true" is default, thus it is not necessary.

My question is why title="" does not automatically do escaping.

Zsolt

>-----Original Message-----
>From: Jared Blitzstein [mailto:mailing-list@blitzstein.net]
>Sent: Thursday, March 09, 2006 2:56 PM
>To: Struts Users Mailing List
>Subject: Re: <html:link title=... escaping.
>
>Well for JSTL it's <c:out value="${subject}" escapeXml="true" />
>
>On Mar 9, 2006, at 6:35 AM, Zsolt wrote:
>
>> Hi,
>>
>> I use struts-1.2.8 and wan't to special html patterns (for example
>> &gt;) in
>> title of <html:link. Is that correct, that I have to escape those
>> characters?
>>
>> Right now I use:
>>
>> <c:set var="linkTitle">
>> 	<c:out value="${latestNews.subject}" />
>> </c:set>
>>
>> <html:link title="${linkTitle}" href="${link}">
>> 	<c:out value="${subject}" />
>> </html:link>
>>
>> Is there a better way?
>>
>> Zsolt
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Posted by Jared Blitzstein <ma...@blitzstein.net>.
Well for JSTL it's <c:out value="${subject}" escapeXml="true" />

On Mar 9, 2006, at 6:35 AM, Zsolt wrote:

> Hi,
>
> I use struts-1.2.8 and wan't to special html patterns (for example  
> &gt;) in
> title of <html:link. Is that correct, that I have to escape those
> characters?
>
> Right now I use:
>
> <c:set var="linkTitle">
> 	<c:out value="${latestNews.subject}" />
> </c:set>
>
> <html:link title="${linkTitle}" href="${link}">
> 	<c:out value="${subject}" />
> </html:link>
>
> Is there a better way?
>
> Zsolt
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org