velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smadirondack <>
Subject Java method that generates html tags is escaping angle brackets...
Date Sun, 17 Jun 2012 06:11:25 GMT

>From a Velocity template I call a java method that generates html tags

 <area shape="rect" href="" />

But it encodes so the page ends up with the following

&lt;area shape=&quot;rect&quot; href=&quot;http:.....

Here's part of the template:


In the java method I just use StringBuilder with its append method and
return the toString like the following:

StringBuilder sb = new StringBuilder();
sb.append("<area shape=\"rect\" href=\"\" />");
return sb.toString();

What can I do so that the generated html is not encoded?

View this message in context:
Sent from the Velocity - User mailing list archive at

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

View raw message