Applying fix from 'euromark' to fix protocol relative links

Fixes #2107
This commit is contained in:
mark_story 2011-10-17 21:03:25 -04:00
parent 1d8199b86d
commit 55064b6573
2 changed files with 4 additions and 1 deletions

View file

@ -775,7 +775,7 @@ class Router {
}
} else {
if (
(strpos($url, '://') ||
(strpos($url, '://') !== false ||
(strpos($url, 'javascript:') === 0) ||
(strpos($url, 'mailto:') === 0)) ||
(!strncmp($url, '#', 1))

View file

@ -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));
}
/**