You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ryan <wi...@mandrake.us> on 2011/11/03 20:20:03 UTC

invalid URL when using a pageparameter that contains a quote

Using Wicket 1.4.19 and doing something simple such as this:

public HomePage(final PageParameters parameters) {
	parameters.add("meh", "someone's link");
	add(new BookmarkablePageLink<Void>("link",HomePage.class, parameters));
}

The url that is generated for the link is:
127.0.0.1:8080/myproject/test/meh/someone\'s link

If you then click the link the new url is:
127.0.0.1:8080/myproject/test/meh/someone\\'s link/meh/someone\'s link

This happens because JavascriptUtils.escapeQuotes() gets called on the
pageparameters. Am I missing something or is this just a bug? If it is a
bug I am happy to file a jira issue with a quickstart attached. 

Thanks,
Ryan

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


Re: invalid URL when using a pageparameter that contains a quote

Posted by Ryan <wi...@mandrake.us>.
1.5.2 works as expected (no backslash in the url).

Ryan

On Thu, Nov 03, 2011 at 01:07:33PM -0700, Igor Vaynberg exclaimed:

>Does it happen with 1.5.x?
>
>-igor
>On Nov 3, 2011 12:20 PM, "Ryan" <wi...@mandrake.us> wrote:
>
>> Using Wicket 1.4.19 and doing something simple such as this:
>>
>> public HomePage(final PageParameters parameters) {
>>        parameters.add("meh", "someone's link");
>>        add(new BookmarkablePageLink<Void>("link",HomePage.class,
>> parameters));
>> }
>>
>> The url that is generated for the link is:
>> 127.0.0.1:8080/myproject/test/meh/someone\'s link
>>
>> If you then click the link the new url is:
>> 127.0.0.1:8080/myproject/test/meh/someone\\'s link/meh/someone\'s link
>>
>> This happens because JavascriptUtils.escapeQuotes() gets called on the
>> pageparameters. Am I missing something or is this just a bug? If it is a
>> bug I am happy to file a jira issue with a quickstart attached.
>>
>> Thanks,
>> Ryan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

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


Re: invalid URL when using a pageparameter that contains a quote

Posted by Igor Vaynberg <ig...@gmail.com>.
Does it happen with 1.5.x?

-igor
On Nov 3, 2011 12:20 PM, "Ryan" <wi...@mandrake.us> wrote:

> Using Wicket 1.4.19 and doing something simple such as this:
>
> public HomePage(final PageParameters parameters) {
>        parameters.add("meh", "someone's link");
>        add(new BookmarkablePageLink<Void>("link",HomePage.class,
> parameters));
> }
>
> The url that is generated for the link is:
> 127.0.0.1:8080/myproject/test/meh/someone\'s link
>
> If you then click the link the new url is:
> 127.0.0.1:8080/myproject/test/meh/someone\\'s link/meh/someone\'s link
>
> This happens because JavascriptUtils.escapeQuotes() gets called on the
> pageparameters. Am I missing something or is this just a bug? If it is a
> bug I am happy to file a jira issue with a quickstart attached.
>
> Thanks,
> Ryan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>