PHP-030 / Intermediate
URL input in Blade attributes (javascript: scheme)
Why is this a problem?
The {{ }} escaping mechanism does not block the javascript: scheme.
How to fix it
php
// Validate before saving
$request->validate(['website' => ['nullable', 'url:http,https']]); blade
<a href="{{ $safeUrl }}" rel="noopener noreferrer">Homepage</a>