mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
multiple strpos to preg_match
This commit is contained in:
parent
319658e9d3
commit
57bf15a415
1 changed files with 1 additions and 8 deletions
|
@ -829,14 +829,7 @@ class Router {
|
|||
$output = self::_handleNoRoute($url);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
(strpos($url, '://') !== false ||
|
||||
(strpos($url, 'javascript:') === 0) ||
|
||||
(strpos($url, 'mailto:') === 0) ||
|
||||
(strpos($url, 'tel:') === 0) ||
|
||||
(strpos($url, 'sms:') === 0)) ||
|
||||
(!strncmp($url, '#', 1))
|
||||
) {
|
||||
if (preg_match('/:\/\/|^(javascript|mailto|tel|sms):|\#/i', $url)) {
|
||||
return $url;
|
||||
}
|
||||
if (substr($url, 0, 1) === '/') {
|
||||
|
|
Loading…
Reference in a new issue