function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David BinsteadDavid Binstead 

Invalid Page Redirection error with email value in PageReference url

I am redirecting a visualforce page with an embedded flow to another page using PageReference on flow finish. I have a name/value pair for an email addresss.
        
I have tried encoding this using EncodingUtil.urlEncode() but it still gives the error. When I check the debug output it appears as :

david_smith%2540thedomain.com

When I comment this line out, it works fine with the other parameters.

Thanks

RamuRamu (Salesforce Developers) 
hi David, this seems to be an expected behavior as you are using URLENCODE method which converts all spaces to '+' or %20 similary the @ symbol is converted to %2540.

Try using a different field for name/value pair other than email if that works.
David BinsteadDavid Binstead
Hi Ramu, This did not seem to work. In fact i'm getting issues with other fields as well. I.e a phone number with a + symbol.. It's encoding but still giving me the error.