Check if a URL is valid and is in our list of allowed URLs.
public static checkURLAllowed ( string $url, array $trustedSites = null ) : string | ||
$url | string | The URL to check. |
$trustedSites | array | An optional white list of domains. If none specified, the 'trusted.url.domains' configuration directive will be used. |
Résultat | string | The normalized URL itself if it is allowed. An empty string if the $url parameter is empty as defined by the empty() function. |