diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index b10d53c32f..a36de22477 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1072,7 +1072,7 @@ function clean_url( $url, $protocols = null ) { $strip = array('%0d', '%0a'); $url = str_replace($strip, '', $url); $url = str_replace(';//', '://', $url); - $url = (strpos($url, '://') === false) ? 'http://'.$url : $url; + $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); if ( !is_array($protocols) ) $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');