mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
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:
parent
b622d954e3
commit
64e33fdaa8
@ -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…
Reference in New Issue
Block a user