Don't prepend http to fragments. Props scohoust. fixes #4051

git-svn-id: http://svn.automattic.com/wordpress/trunk@11126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-29 20:10:06 +00:00
parent b622d954e3
commit 64e33fdaa8
1 changed files with 1 additions and 1 deletions

View File

@ -2004,7 +2004,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
* link starting with / or a php file).
*/
if ( strpos($url, ':') === false &&
substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) )
substr( $url, 0, 1 ) != '/' && substr( $url, 0, 1 ) != '#' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) )
$url = 'http://' . $url;
// Replace ampersands and single quotes only when displaying.