Skip to content

Commit

Permalink
Applying fix from 'euromark' to fix protocol relative links
Browse files Browse the repository at this point in the history
Fixes #2107
  • Loading branch information
markstory committed Oct 18, 2011
1 parent 1d8199b commit 55064b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Routing/Router.php
Expand Up @@ -775,7 +775,7 @@ public static function url($url = null, $full = false) {
}
} else {
if (
(strpos($url, '://') ||
(strpos($url, '://') !== false ||
(strpos($url, 'javascript:') === 0) ||
(strpos($url, 'mailto:') === 0)) ||
(!strncmp($url, '#', 1))
Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Test/Case/Routing/RouterTest.php
Expand Up @@ -2420,6 +2420,9 @@ public function testUrlProtocol() {

$url = 'svn+ssh://example.com';
$this->assertEqual($url, Router::url($url));

$url = '://example.com';
$this->assertEqual($url, Router::url($url));
}

/**
Expand Down

0 comments on commit 55064b6

Please sign in to comment.