Skip to content

Kirby 5.4.3

Url::hasDangerousScheme()

Checks if a URL starts with a dangerous URI scheme (e.g. javascript:) that must never appear in rendered href or src attributes.

Url::hasDangerousScheme(string|null $url = null): bool

Parameters

Name Type Default
$url stringornull null

Return type

bool

Parent class

Kirby\Http\Url