Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a3a138

Browse files
committed
Check for hash in "isValidUrl". Closes laravel#1074.
1 parent d6a2cbf commit 1a3a138

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Illuminate/Routing/UrlGenerator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ protected function getRootUrl($scheme)
286286
*/
287287
public function isValidUrl($path)
288288
{
289+
if (starts_with($path, '#')) return true;
290+
289291
return filter_var($path, FILTER_VALIDATE_URL) !== false;
290292
}
291293

0 commit comments

Comments
 (0)