[ 
https://issues.apache.org/jira/browse/WICKET-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632468#action_12632468
 ] 

Matej Knopp commented on WICKET-1426:
-------------------------------------

I removed the workaround code from Wicket because it was causing problems with 
absolute URLs. I can't reproduce the problem on Firefox (test both 2 and 3) 
with latest trunk

> URL creation in wicket-ajax.js -> Wicket.Ajax.Call.doGet produces broken URLs 
> for Gecko
> ---------------------------------------------------------------------------------------
>
>                 Key: WICKET-1426
>                 URL: https://issues.apache.org/jira/browse/WICKET-1426
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>         Environment: Firefox 2
>            Reporter: Martin Grigorov
>            Assignee: Matej Knopp
>
> With r628015 (Wicket 1.3.2) creation of full URL for Gecko browsers creates 
> broken URLs when there is a slash ('/') in the http parameter values.
> For example when a page with this URL is loaded: 
> http://localhost/app?key=value/ 
>  wicketAjaxGet will issue a query with this content:
> http://localhost/app?key=value/../?wicket:interface=:....
> By RFC2396 the query part of URL could be:
>  query         = *uric
>  uric          = reserved | unreserved | escaped
>  reserved      = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
>                       "$" | ","
>  unreserved    = alphanum | mark
> So '/' is allowed.
> Here is a quick patch:
> --- wicket-ajax.js      (revision 637425)
> +++ wicket-ajax.js      (working copy)
> @@ -823,6 +823,10 @@
>                         if (t != null) {
>                                 if (Wicket.Browser.isGecko()) {
>                                         var href = document.location.href;
> +                                       var lastIndexOfQuestionMark = 
> href.lastIndexOf('?');
> +                                       if (lastIndexOfQuestionMark > -1) {
> +                                               href = href.substring(0, 
> lastIndexOfQuestionMark);
> +                                       }
>                                         var lastIndexOf = 
> href.lastIndexOf('/');
>                                         if (lastIndexOf > 0)
>                                         {

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to