diff options
author | diosmosis <benaka@piwik.pro> | 2015-09-10 00:30:44 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-09-10 00:37:26 +0300 |
commit | e8ed895332f6bd4c614fd6e9234eb59d4c2d060d (patch) | |
tree | 14cc604bb174caa597b7a9ce01c3c766ce86d983 /core/UrlHelper.php | |
parent | f7678c9fdc1e12310aea3f2654c51c8195104f85 (diff) |
Correctly parse URL schemes in UrlHelper::isLookLikeUrl().
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r-- | core/UrlHelper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/UrlHelper.php b/core/UrlHelper.php index 3a550c8eb3..4a0ac0fa0a 100644 --- a/core/UrlHelper.php +++ b/core/UrlHelper.php @@ -107,8 +107,8 @@ class UrlHelper */ public static function isLookLikeUrl($url) { - return preg_match('~^((ftp|news|http|https)?:)?//(.*)$~D', $url, $matches) !== 0 - && strlen($matches[3]) > 0; + return preg_match('~^(([[:alpha:]][[:alnum:]+.-]*)?:)?//(.*)$~D', $url, $matches) !== 0 + && strlen($matches[3]) > 0; } /** |