public static UrlHelper::isExternal($path)
Determines whether a path is external to Drupal.
An example of an external path is http://example.com. If a path cannot be assessed by Drupal's menu handler, then we must treat it as potentially insecure.
Parameters
string $path: The internal path or external URL being linked to, such as "node/34" or "http://example.com/foo".
Return value
bool TRUE or FALSE, where TRUE indicates an external path.
File
core/lib/Drupal/Component/Utility/UrlHelper.php,