menu_path_is_external

6 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()

File

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);
}

Comments

url_is_external() in D7

This function has been renamed in D7:
http://api.drupal.org/api/function/url_is_external/7

Login or register to post comments