views:

55

answers:

1

I'm trying to get Velocity to output the following Javascript code:

if ((whichOne+1) <= numCallouts ) {
whichOne = whichOne + 1; } else {
whichOne = 1;
     }

Whenever I try to get Velocity to print a > or a <, it represents it as a & gt; or & lt;, which doesn't help me since I'm trying to get it to produce Javascript. I've tried:

#set ( $gt = ">" )

But even that ends up as a & gt;

Thanks in advance.

+1  A: 

It is not a default behavior, the only reason I can think of why this is happening is if you have event ReferenceInsertionEventHandler configured with EscapeHtmlReference either in your velocity.config or in the Velocity initialization code.

Here is more info about events

serg