function menu_path_is_external
6.x menu.inc | menu_path_is_external($path) |
Returns TRUE if a path is external (e.g. http://example.com).
Related topics
3 calls to menu_path_is_external()
- menu_edit_item_validate in drupal-6.x/
modules/ menu/ menu.admin.inc - Validate form values for a menu link being added or edited.
- menu_link_save in drupal-6.x/
includes/ menu.inc - Save a menu link.
- menu_valid_path in drupal-6.x/
includes/ menu.inc - Validates the path of a menu link being created or edited.
File
- drupal-6.x/
includes/ menu.inc, line 2475 - API for the Drupal menu system.
Code
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);
}