function _openid_url_normalize in Drupal 7
OpenID normalization method: normalize URL identifiers.
1 string reference to '_openid_url_normalize'
- openid_openid_normalization_method_info in modules/
openid/ openid.module - Implements hook_openid_normalization_method_info().
File
- modules/
openid/ openid.inc, line 315 - OpenID utility functions.
Code
function _openid_url_normalize($url) {
$normalized_url = $url;
if (stristr($url, '://') === FALSE) {
$normalized_url = 'http://' . $url;
}
// Strip the fragment and fragment delimiter if present.
$normalized_url = strtok($normalized_url, '#');
if (substr_count($normalized_url, '/') < 3) {
$normalized_url .= '/';
}
return $normalized_url;
}