yeah, the encode URL method is not meant to escape key URL characters,
but rather to encode spaces and such to be URL-friendly.

if you want to escape key URL characters like '?', you will either
need to write your own method or find a utility.  you might try the
StringUtils class in commons-lang or something like that.

On 8/18/05, sliver <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> how do I encode a string in velocity?
> 
> I tried this
> 
> #set( $encodedStr = $link.encodeURL($string))
> 
> but it doesn't encode characters like '?' and '&'. I need them to put a URL
> into a parameter of a request string.
> 
> e.g.
> http://foo.bar.org/some.action?backurl=another.action?foo=bar&bar=foo
> 
> where backurl should be another.action?foo=bar&bar=foo
> 
> TIA
> Stefan
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to