views:

228

answers:

1

Hi,

Excuse my ignorance but I am new to Velocity and trying to fix someone else's problem. I need to encode a URL inside the velocity template. I create a url and as part of the query string I pass in a page name a user created. This page can contain special characters like ëðû. The url would look like http://foo.com/page1/jz?page=SpecialChars_ëðû

A: 

To encode URL inside a template you can use:

$esc.url($myUrl)

which is a part of EscapeTool.

serg
Is there anything you need to do to enable the escape tools? I tried added this to my template, like $esc.url($myParam) but it was treated as a literal.
Brabster
Do you have any tools enabled at all? How to enable them depends on how you initialize your velocity engine.
serg