SimplePie_Misc::url_remove_credentials()public staticWP 1.0

Sanitize a URL by removing HTTP credentials.

{} It's a method of the class: SimplePie_Misc{}

No Hooks.

Return

String. the same URL without HTTP credentials.

Usage

$result = SimplePie_Misc::url_remove_credentials( $url );
$url(string) (required)
the URL to sanitize.

Code of SimplePie_Misc::url_remove_credentials() WP 6.0

public static function url_remove_credentials($url)
{
	return preg_replace('#^(https?://)[^/:@]+:[^/:@][email protected]#i', '$1', $url);
}