From 494d54de3016fc880068c7bf0af906d497088277 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 29 Apr 2009 20:10:06 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 3c9adb68d9..931329951f 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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.