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

git-svn-id: https://develop.svn.wordpress.org/trunk@11126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-29 20:10:06 +00:00
parent ca5807df86
commit 494d54de30
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.