Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Applying fix from 'euromark' to fix protocol relative links

Fixes #2107
  • Loading branch information...
commit 55064b6573722eb377d633c06545c25d06691871 1 parent 1d8199b
@markstory markstory authored
View
2  lib/Cake/Routing/Router.php
@@ -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))
View
3  lib/Cake/Test/Case/Routing/RouterTest.php
@@ -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));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.