Skip to content

Commit 5d63d5a

Browse files
committed
Consider protocoless URLs as valid. Closes. #1966.
1 parent 1fdd186 commit 5d63d5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

laravel/url.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ public static function transpose($uri, $parameters)
355355
*/
356356
public static function valid($url)
357357
{
358+
if (starts_with($url, '//')) return true;
359+
358360
return filter_var($url, FILTER_VALIDATE_URL) !== false;
359361
}
360362

0 commit comments

Comments
 (0)