You need to sign in to do that
Don't have an account?
Ravindar Admin
%20 is changing to + through outputLink
Hi, I am using Output link as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
<apex:outputLink value="/apex/Web_LatestNews_LTG?tags=Selective%20Line&thematicPage=1"> </apex:outputLink>When I click on the link, It should redirect as it is. But, '%20' is changing to '+' as below:
https://test-test.cs86.force.com/Web_LatestNews_LTG?tags=Selective+Line&thematicPage=1
How to prevent changing '%20' to '+' ?
Please pass the parameter is <apex:param> as below.
<apex:outputLink value=""/apex/Web_LatestNews_LTG" >Click Me
<apex:param name="tags" value="Selective%20Line" ></apex:param>
<apex:param name="thematicPage" value="1"></apex:param>
</apex:outputLink>
In your controller for the page, in constructor fetch these as below :-
ApexPages.currentPage().getParameters().get('tags');
ApexPages.currentPage().getParameters().get('thematicPage');
I hope this helps you out.
All Answers
In URL, a space is replaced with "%20" or (+) sign. I would suggest to remove the space and then try with the output link, as URL cannot contains spaces.
My URL doesn't have any spaces. We hardcoded %20 in outputLink. The expected o/p only comes If the URL contains %20. But, It is changing to '+'. Thanks.
Please pass the parameter is <apex:param> as below.
<apex:outputLink value=""/apex/Web_LatestNews_LTG" >Click Me
<apex:param name="tags" value="Selective%20Line" ></apex:param>
<apex:param name="thematicPage" value="1"></apex:param>
</apex:outputLink>
In your controller for the page, in constructor fetch these as below :-
ApexPages.currentPage().getParameters().get('tags');
ApexPages.currentPage().getParameters().get('thematicPage');
I hope this helps you out.