SimplePie_Misc::url_remove_credentials() – Sanitize a URL by removing HTTP credentials.

You appear to be a bot. Output may be restricted

Description

Sanitize a URL by removing HTTP credentials.

Usage

$string = SimplePie_Misc::url_remove_credentials( $url );

Parameters

$url
( string ) required – the URL to sanitize.

Returns

string the same URL without HTTP credentials.

Source

File name: wordpress/wp-includes/SimplePie/Misc.php


Lines:

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

 View on GitHub View on Trac