Re: URI and IRI validation
| From: | Helgi Þormar Þorbjörnsson | Date: | Sat, 23 Jun 2007 12:23:43 +0000 |
| Subject: | Re: URI and IRI validation | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47111@lists.php.net to get a copy of this message | ||
On 6/23/07, Pádraic Brady <padraic.brady@yahoo.com> wrote:
Hi all, More newbie checking on the way. I was doing some tinkering inside the code for a third proposal (this time the heavy weight Services_Yadis). I checked out the Validate packages and they have a small function for validating URLs. I didn't see any validation being carried as part of the Net_Url package either. One of the things I need to do, both for Yadis and OpenID is to validate a URI very strictly (to the letter of the RFC). It also needs to be normalised, and have a method for defining certain URI parts (e.g. a query string) as being always invalid. Secondly, I need to add support for IDNs (Internationalised Domain Names) which allow for a subset of Unicode characters in domain names within very specific ranges for a number of national TLDs. For example, something like http://www.pádraic.ie (which will be possible in a few years) or http://www.bücher.ch will all fail the current Validate::uri() check. IDN support has been growing recently - especially since Mozilla and Opera took a small beating over proposing the remove it from their browsers (it allows new forms of phishing) and IE7 was released with native support. *nix has had libidn sitting around since 2003. There's around 40 DNS registries now supporting IDNs so far, including com, org, net, etc. (Verisign has been busy!). I'll contact the current PHP4 author(s) for the Validate package, but would this be seen as acceptable PHP5 proposal? Given the complexity, likely as a standalone Validate_URI. For the moment I can package an alternative internal to the Yadis code.You did ? Hmm you sure you sent it to all of us ? Because I can't find it in moi inbox :-/ - Helgi