You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Emond Papegaaij (JIRA)" <ji...@apache.org> on 2009/02/26 14:09:02 UTC

[jira] Created: (WICKET-2131) RequestCycle.urlFor does not escape & properly

RequestCycle.urlFor does not escape & properly
----------------------------------------------

                 Key: WICKET-2131
                 URL: https://issues.apache.org/jira/browse/WICKET-2131
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.5
            Reporter: Emond Papegaaij


RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Commented: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677063#action_12677063 ] 

Martijn Dashorst commented on WICKET-2131:
------------------------------------------

This requires a couple more tweaks than just one location...

Index: ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
===================================================================
--- ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java	(revision 746413)
+++ ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java	(working copy)
@@ -909,7 +909,7 @@
 
 		if (IActivePageBehaviorListener.INTERFACE.getName().equals(listenerName))
 		{
-			url.append(url.indexOf("?") > -1 ? "&" : "?").append(
+			url.append(url.indexOf("?") > -1 ? "&amp;" : "?").append(
 				IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME).append("=true");
 		}
 		return url;
Index: ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java
===================================================================
--- ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java	(revision 746413)
+++ ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java	(working copy)
@@ -75,9 +75,9 @@
 	 */
 	public void addValue(String key, String value)
 	{
-        if (!firstParameter)
+		if (!firstParameter)
 		{
-			url.append('&');
+			url.append("&amp;");
 		}
 		else
 		{
Index: ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
===================================================================
--- ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java	(revision 746413)
+++ ../../wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java	(working copy)
@@ -886,7 +886,7 @@
 					final Map.Entry entry = (Entry)it.next();
 					final String key = entry.getKey().toString();
 					final String value = entry.getValue().toString();
-					buff.append("&");
+					buff.append("&amp;");
 					buff.append(encodeQueryStringItem(key));
 					buff.append("=");
 					buff.append(encodeQueryStringItem(value));


> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.6
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Commented: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Emond Papegaaij (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708345#action_12708345 ] 

Emond Papegaaij commented on WICKET-2131:
-----------------------------------------

The incorrect rendering of ignoreIfNotActive is also discussed in #2033.

> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.7
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Updated: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2131:
----------------------------------

    Fix Version/s:     (was: 1.3.7)
                   1.3.8

> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.8
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Commented: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Matt Brictson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708239#action_12708239 ] 

Matt Brictson commented on WICKET-2131:
---------------------------------------

This bug affects Wicket 1.4-rc4 as well. It did not affect 1.4-rc2. It was probably introduced in changeset 755201 (http://fisheye6.atlassian.com/changelog/wicket?cs=755201).

Here is example output in Wicket 1.4-rc4. Note that the ampersand before wicket:ignoreIfNotActive is not property escaped to &amp;:

<input type="submit" wicket:id="ajax-link" name="ajax-link" id="ajax_link2" onclick="var wcall=wicketSubmitFormById('form1', '?wicket:interface=:0:form:ajax-link::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true', 'ajax-link' ,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('form1')}.bind(this));;; return false;"/>


> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.7
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Resolved: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2131.
-----------------------------------

      Assignee: Igor Vaynberg
    Resolution: Won't Fix

fixed in 1.4.x, wont be fixed in 1.3.x

> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.8
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Updated: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst updated WICKET-2131:
-------------------------------------

    Fix Version/s: 1.3.6

This bug only affects 1.3.x since url generation was modified in 1.4 (though haven't tested the resulting markup for 1.4).

I've modified the & in an &amp; and didn't see any failing unit tests.

> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.6
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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


[jira] Updated: (WICKET-2131) RequestCycle.urlFor does not escape & properly

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2131:
----------------------------------

    Fix Version/s:     (was: 1.3.6)
                   1.3.7

> RequestCycle.urlFor does not escape & properly
> ----------------------------------------------
>
>                 Key: WICKET-2131
>                 URL: https://issues.apache.org/jira/browse/WICKET-2131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>             Fix For: 1.3.7
>
>
> RequestCycle.urlFor(final Component, RequestListenerInterface, ValueMap) adds an unescaped & to the url ("buff.append("&");"), it should include a &amp;.

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