diff options
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 b1dfa46d12..5efba99996 100644 --- a/core/UrlHelper.php +++ b/core/UrlHelper.php @@ -101,8 +101,8 @@ class UrlHelper */ public static function isLookLikeUrl($url) { - return preg_match('~^(ftp|news|http|https)?://(.*)$~D', $url, $matches) !== 0 - && strlen($matches[2]) > 0; + return preg_match('~^((ftp|news|http|https)?:)?//(.*)$~D', $url, $matches) !== 0 + && strlen($matches[3]) > 0; } /** |