| Versionen | |
|---|---|
| drupal6 – drupal7 | menu_path_is_external($path) |
Returns TRUE if a path is external (e.g. http://example.com).
includes/
<?php
function menu_path_is_external($path) {
$colonpos = strpos($path, ':');
return $colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && filter_xss_bad_protocol($path, FALSE) == check_plain($path);
}
?>
Kommentare
Kommentar hinzufügen