Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.5

Bug #14075 Validate::uri() rejects valid tag: URIs
Submitted: 2008-06-04 22:18 UTC Modified: 2008-10-23 16:43 UTC
From: evanprodromou Assigned: davidc
Status: Closed Package: Validate (version 0.8.1)
PHP Version: 5.2.3 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-06-04 22:18 UTC] evanprodromou (Evan Prodromou)
Description: ------------ tag: is a registered URI scheme (http://www.iana.org/assignments/uri-schemes.html) defined in RFC 4151 (http://www.faqs.org/rfcs/rfc4151.html, see also http://www.taguri.org/). Valid tag: URIs are rejected by Validate::uri(), probably because they don't have quite the same format as e.g. http: URLs. It may be worthwhile to break up the URI validation by URI scheme, so that different kinds of URIs can be validated in different ways. Test script: --------------- <?php # Validate.php must be installed and in PHP path require_once('Validate.php'); if (Validate::uri('tag:evan@prodromou.name,2006:test:1')) { echo "Success!\n"; } else { echo "Failure!\n"; } Expected result: ---------------- Success! Actual result: -------------- Failure!

Comments

 [2008-10-22 13:26 UTC] davidc (David Coallier)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2008-10-23 16:43 UTC] doconnor (Daniel O'Connor)
http://article.gmane.org/gmane.comp.php.cvs.pear/50563 + function rfc4151($url){ + echo "rfc4141: url '$url'\n"; + $datevalid = false; + if (preg_match( Probably shouldn't echo