From 5d63d5ad524688fdbf55b926e256c967e50d660e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 May 2013 00:51:05 -0500 Subject: [PATCH] Consider protocoless URLs as valid. Closes. #1966. --- laravel/url.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/laravel/url.php b/laravel/url.php index b8fb1f46..1e006a94 100644 --- a/laravel/url.php +++ b/laravel/url.php @@ -355,6 +355,8 @@ public static function transpose($uri, $parameters) */ public static function valid($url) { + if (starts_with($url, '//')) return true; + return filter_var($url, FILTER_VALIDATE_URL) !== false; }