wp/wp-includes/SimplePie/Misc.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
  2258 
  2258 
  2259 	public static function silence_errors($num, $str)
  2259 	public static function silence_errors($num, $str)
  2260 	{
  2260 	{
  2261 		// No-op
  2261 		// No-op
  2262 	}
  2262 	}
       
  2263 
       
  2264 	/**
       
  2265 	 * Sanitize a URL by removing HTTP credentials.
       
  2266 	 * @param string $url the URL to sanitize.
       
  2267 	 * @return string the same URL without HTTP credentials.
       
  2268 	 */
       
  2269 	public static function url_remove_credentials($url)
       
  2270 	{
       
  2271 		return preg_replace('#^(https?://)[^/:@]+:[^/:@]+@#i', '$1', $url);
       
  2272 	}
  2263 }
  2273 }