Redirect to page on 'Save' action

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Redirect to page on 'Save' action

Andrew Kuang
Hi there,

I had a question regarding the redirect that is happening in the SaveAction class. When you have a title such as "1 & 2", hitting 'Save' will make the AJAX call and redirect you to "www.wiki.com/bin/view/1+%26+2". The encoding of the '&' appears to be done in the call to Util.getRedirect('view', context) in the SaveAction class.

I want to be able to redirect to "www.wiki-name.com/bin/view/1+&+2" so that users do not have to see the encoded URL (in case they wish to copy-paste the url elsewhere). I was able to do this by extending the SaveAction class into a class of my own, overriding the action() method, and doing a string replace of all instances of "%26" with "&"; however, this is a very hacky solution.

I was hoping to get input on any other alternative ways to provide cleaner URLs to my users. Thank you!