velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Reynolds">
Subject Re: A link
Date Fri, 29 Oct 2004 16:24:43 GMT
> Hi Manish,
>> I have an area in my form for user comments, the user may type
>> following text in his comments -
>> <a href=">some name</a>
>> I print this text in my template as -
>> $user.comments
>> However, this link is not treated as HTML but as normal text. How can
>> I treat it as HTML by default?
>> The user may or may not use HTML tags, but I'd still want to treat it
>> as HTML. How do I do this?
> I'm not quite sure what you want to do, but will this help?

Hi, i'm new to the list and can't give offer a velocity solution, but i do
know exactly what manish is talking about. it does look the Escape Tool is
used for something else

i ran into this using the struts-bean taglibs, where you want the HTML to
be parsed:

<bean:write filter="false" name="article" property="articleBodyShort" />

The filter=false is the key. By default, it's filter="true", so if your
string contains HTML, it will *not* get parsed, it will just print to
screen as is. I specifically turn filter=false for all bean:write tags that
i know will include HTML.

Hopefully someone knows the velocity equivalent of this


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message