mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Applying fix from 'euromark' to fix protocol relative links
Fixes #2107
This commit is contained in:
parent
1d8199b86d
commit
55064b6573
2 changed files with 4 additions and 1 deletions
|
@ -775,7 +775,7 @@ class Router {
|
|||
}
|
||||
} else {
|
||||
if (
|
||||
(strpos($url, '://') ||
|
||||
(strpos($url, '://') !== false ||
|
||||
(strpos($url, 'javascript:') === 0) ||
|
||||
(strpos($url, 'mailto:') === 0)) ||
|
||||
(!strncmp($url, '#', 1))
|
||||
|
|
|
@ -2420,6 +2420,9 @@ class RouterTest extends CakeTestCase {
|
|||
|
||||
$url = 'svn+ssh://example.com';
|
||||
$this->assertEqual($url, Router::url($url));
|
||||
|
||||
$url = '://example.com';
|
||||
$this->assertEqual($url, Router::url($url));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue