diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-21 12:31:59 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-03-21 12:31:59 +0000 |
| commit | c2096dd195219156d14a4efa95280f9ab104963c (patch) | |
| tree | 82fe8e1693b78cc88657bdecbba0418a6a5f4c01 /wp-includes/formatting.php | |
| parent | 2537297297bdf60e586581328b795d1e353a2cce (diff) | |
| download | wordpress-mu-c2096dd195219156d14a4efa95280f9ab104963c.tar.gz wordpress-mu-c2096dd195219156d14a4efa95280f9ab104963c.tar.xz wordpress-mu-c2096dd195219156d14a4efa95280f9ab104963c.zip | |
WP Merge to rev 5072
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@928 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/formatting.php')
| -rw-r--r-- | wp-includes/formatting.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index b10d53c..a36de22 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1072,7 +1072,7 @@ function clean_url( $url, $protocols = null ) { $strip = array('%0d', '%0a'); $url = str_replace($strip, '', $url); $url = str_replace(';//', '://', $url); - $url = (strpos($url, '://') === false) ? 'http://'.$url : $url; + $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); if ( !is_array($protocols) ) $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); |
