mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
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:
parent
ca5807df86
commit
494d54de30
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user