Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-09-10 00:30:44 +0300
committerdiosmosis <benaka@piwik.pro>2015-09-10 00:37:26 +0300
commite8ed895332f6bd4c614fd6e9234eb59d4c2d060d (patch)
tree14cc604bb174caa597b7a9ce01c3c766ce86d983 /core/UrlHelper.php
parentf7678c9fdc1e12310aea3f2654c51c8195104f85 (diff)
Correctly parse URL schemes in UrlHelper::isLookLikeUrl().
Diffstat (limited to 'core/UrlHelper.php')
-rw-r--r--core/UrlHelper.php4
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;
}
/**