E
Elena
Hello,
I'm writing a JSP whose result page should allow for redirection to an
URL specified by the caller via a GET parameter.
I'm going to assign that URL to Javascript's "document.location" and
that works, but I'd also like to "sanitize" the URL parameter to make
sure it is an URL instead of a nasty character combination which could
break my application. I'd like to employ a Java regex for that, but I
can't find a ready made regex to match URLs. Any pointer?
Thanks
I'm writing a JSP whose result page should allow for redirection to an
URL specified by the caller via a GET parameter.
I'm going to assign that URL to Javascript's "document.location" and
that works, but I'd also like to "sanitize" the URL parameter to make
sure it is an URL instead of a nasty character combination which could
break my application. I'd like to employ a Java regex for that, but I
can't find a ready made regex to match URLs. Any pointer?
Thanks