I would like to do a redirect function with playframework. So far I have this in my routes
GET /redirect com.test.redirect(redirecturl: String?="")
and my controller :
public static Result redirect(String redirecturl) {
return redirect(redirectURL);
}
This is working well but I have a problem when I pass a url containing a semicolon ";"
If I go to
http:localhost:9000/redirect?redirecturl=http://www.google.com;testaftersemicolon
It redirect me to google.com but in my log the redirecturl is only equals to "http://www.google.com" stopping after a semicolon.
Is there a way to escape it ? Or to do a custom routing inside play?