WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Daniel Stoch
Hi,

I'm using WicketURLEncoder (1.4.18) to encode some parameter values.
Exactly WicketURLEncoder.QUERY_INSTANCE, but the problem if parameter
value contains / (slash) character, eg.: 1 Mbit/s, which is not
escaped. This cause an error in url coding startegy which is based on
key/value pairs (/key1/value1/key2/value2) because value contains /
and brokes the whole url.

Here it is an output from different version of WicketURLEncoder for this value:
WicketURLEncoder.PATH_INSTANCE = 1%20Mbit%2Fs
WicketURLEncoder.FULL_PATH_INSTANCE = 1%20Mbit/s
WicketURLEncoder.QUERY_INSTANCE = 1+Mbit/s

So should I use PATH_INSTANCE to encode these parameter values instead
of QUERY_INSTANCE?

I do not use Wicket 6, but maybe the same problem is in that version?

--
Best regards,
Daniel

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Martin Grigorov
Hi,

Since you use parameters in the path you have to use PATH_INSTANCE.


On Mon, Nov 26, 2012 at 2:28 PM, Daniel Stoch daniel.st...@gmail.comwrote:

 Hi,

 I'm using WicketURLEncoder (1.4.18) to encode some parameter values.
 Exactly WicketURLEncoder.QUERY_INSTANCE, but the problem if parameter
 value contains / (slash) character, eg.: 1 Mbit/s, which is not
 escaped. This cause an error in url coding startegy which is based on
 key/value pairs (/key1/value1/key2/value2) because value contains /
 and brokes the whole url.

 Here it is an output from different version of WicketURLEncoder for this
 value:
 WicketURLEncoder.PATH_INSTANCE = 1%20Mbit%2Fs
 WicketURLEncoder.FULL_PATH_INSTANCE = 1%20Mbit/s
 WicketURLEncoder.QUERY_INSTANCE = 1+Mbit/s

 So should I use PATH_INSTANCE to encode these parameter values instead
 of QUERY_INSTANCE?

 I do not use Wicket 6, but maybe the same problem is in that version?

 --
 Best regards,
 Daniel

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: WicketURLEncoder: escaping / in parameter value

2012-11-26 Thread Daniel Stoch
Thanks for the very fast answer.
I wanted to change it on PATH_INSTANCE but I wanted to make sure, so I
have asked ;)

--
DS

On Mon, Nov 26, 2012 at 2:32 PM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi,

 Since you use parameters in the path you have to use PATH_INSTANCE.


 On Mon, Nov 26, 2012 at 2:28 PM, Daniel Stoch daniel.st...@gmail.comwrote:

 Hi,

 I'm using WicketURLEncoder (1.4.18) to encode some parameter values.
 Exactly WicketURLEncoder.QUERY_INSTANCE, but the problem if parameter
 value contains / (slash) character, eg.: 1 Mbit/s, which is not
 escaped. This cause an error in url coding startegy which is based on
 key/value pairs (/key1/value1/key2/value2) because value contains /
 and brokes the whole url.

 Here it is an output from different version of WicketURLEncoder for this
 value:
 WicketURLEncoder.PATH_INSTANCE = 1%20Mbit%2Fs
 WicketURLEncoder.FULL_PATH_INSTANCE = 1%20Mbit/s
 WicketURLEncoder.QUERY_INSTANCE = 1+Mbit/s

 So should I use PATH_INSTANCE to encode these parameter values instead
 of QUERY_INSTANCE?

 I do not use Wicket 6, but maybe the same problem is in that version?

 --
 Best regards,
 Daniel

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org