Permalink
Browse files

Be more flexible in what's acceptable as a scheme

git-svn-id: http://svn.php.net/repository/pear/packages/Net_URL/trunk@122708 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent b91caf4 commit 85d11d1d208f022cc54fa45bdd6d8c66f74b22df Richard Heyes committed Apr 6, 2003
Showing with 1 addition and 1 deletion.
  1. +1 −1 URL.php
View
@@ -122,7 +122,7 @@ function Net_URL($url = null, $useBrackets = true)
$this->anchor = '';
// Only use defaults if not an absolute URL given
- if (!preg_match('/^(https?|ftp|telnet|gopher|file):\/\//', $url)) {
+ if (!preg_match('/^[a-z0-9]+:\/\//i', $url)) {
/**
* Figure out host/port
*/

0 comments on commit 85d11d1

Please sign in to comment.