Re: Re: validate URL

From: Date: Thu, 04 Dec 2003 17:52:07 +0000
Subject: Re: Re: validate URL
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24152@lists.php.net to get a copy of this message
On 4 Dec 2003 at 18:40, Martin Jansen wrote: > On Thu Dec 04, 2003 at 06:3439PM +0100, Roman Neuhauser wrote: > > # mj@php.net / 2003-12-04 18:32:08 +0100: > > > IMO the method shouldn't be too strict about the protocol. > > > Accepting everything that only contains characters and nothing > > > else sounds like a good idea to me. > > > > not to me: svn+ssh is one of schemes used by Subversion > > Good catch! RFC 2396 defines allowed schemes like that: > > scheme = alpha *( alpha | digit | "+" | "-" | "." ) > > Maybe it's a good idea to use that one in Validate as well. How about Pierre's idea to be able to supply an optional array of protocols allowed? imho the best solution I see so far. Most times you will only want to validate http, https and ftp - but if you need more or want to allow just http or something you can supply that array to override the standards. I'm +1 on that. Regards, Stefan

« previous php.pear.dev (#24152) next »