Browse Source

Consider protocoless URLs as valid. Closes. #1966.

Taylor Otwell 11 years ago
parent
commit
5d63d5ad52
1 changed files with 2 additions and 0 deletions
  1. 2 0
      laravel/url.php

+ 2 - 0
laravel/url.php

@@ -355,6 +355,8 @@ class URL {
 	 */
 	public static function valid($url)
 	{
+		if (starts_with($url, '//')) return true;
+
 		return filter_var($url, FILTER_VALIDATE_URL) !== false;
 	}