You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Daniel Stoch <da...@gmail.com> on 2012/11/26 14:28:45 UTC

WicketURLEncoder: escaping "/" in parameter value

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: WicketURLEncoder: escaping "/" in parameter value

Posted by Daniel Stoch <da...@gmail.com>.
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 <mg...@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 <da...@gmail.com>wrote:
>
>> 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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

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


Re: WicketURLEncoder: escaping "/" in parameter value

Posted by Martin Grigorov <mg...@apache.org>.
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 <da...@gmail.com>wrote:

> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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