summaryrefslogtreecommitdiffstats
path: root/wp-includes/formatting.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-26 11:04:22 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-26 11:04:22 +0000
commit6b2942866a251bb84a81cb35811ee9a1d55a8d26 (patch)
tree09b245f77ee6eaf5856b00b0e2e7f97bdb3550d8 /wp-includes/formatting.php
parent2e96b99ceb195735a641e299f3209840cc101052 (diff)
downloadwordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.tar.gz
wordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.tar.xz
wordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.zip
WP Merge to rev 5109
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@934 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r--wp-includes/formatting.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index a0c13db..d497819 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -1074,10 +1074,9 @@ function clean_url( $url, $protocols = null ) {
$url = str_replace(';//', '://', $url);
// Append http unless a relative 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 ) != '/' && !preg_match('/^[a-z0-9]+?\.php/i', $url) )
$url = 'http://' . $url;
- $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url;
$url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&#038;$1', $url);
if ( !is_array($protocols) )
$protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');