Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Incomplete
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: HTML Generation
-
Labels:None
Description
Passing in an ampersand escaped url in requestURI attribute produces wrong pagination/sorting link urls.
Say requestURI is: http://my.portal/myapp?portalparam1=param1&portalparam2=param2
A link url may be: http://my.portal/myapp?amp;portalparam2=param1&portalparam1=param1&page=...
May be DefaultHref fails to tokenize parameters (row 113 as of version 1.1):
StringTokenizer paramTokenizer = new StringTokenizer(tokenizer.nextToken(), "&");
with ampersand escaped urls it happens a token to be amp;portalparam2 instead of portalparam2.
Say requestURI is: http://my.portal/myapp?portalparam1=param1&portalparam2=param2
A link url may be: http://my.portal/myapp?amp;portalparam2=param1&portalparam1=param1&page=...
May be DefaultHref fails to tokenize parameters (row 113 as of version 1.1):
StringTokenizer paramTokenizer = new StringTokenizer(tokenizer.nextToken(), "&");
with ampersand escaped urls it happens a token to be amp;portalparam2 instead of portalparam2.
an escaped ampersand is not valid in the url: it needs to be escaped in the document, but the browser should unescape it before following the link and sending the request to the server, so http://my.portal/myapp?portalparam1=param1&portalparam2=param2 IS the same as http://my.portal/myapp?amp;portalparam2=param1&portalparam1=param1
Where are you seeing this problem? How the escaped ampersand is passed to displaytag, is this the behaviour of a specific portal server?