From d650991531fdbca91b530285b78a7faad732fe3c Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 18 Apr 2006 04:58:38 +0000 Subject: [PATCH] Move clean_url() to functions-formatting.php. #2525 git-svn-id: http://svn.automattic.com/wordpress/trunk@3713 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 9 --------- wp-includes/functions-formatting.php | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 1385952de..f322c871b 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -230,15 +230,6 @@ function wp_delete_comment($comment_id) { return true; } -function clean_url( $url ) { - if ('' == $url) return $url; - $url = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $url); - $url = str_replace(';//', '://', $url); - $url = (!strstr($url, '://')) ? 'http://'.$url : $url; - $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); - return $url; -} - function get_comments_number( $post_id = 0 ) { global $wpdb, $comment_count_cache, $id; $post_id = (int) $post_id; diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 63731a5b0..e2d3b7e45 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -1023,4 +1023,13 @@ function wp_richedit_pre($text) { return apply_filters('richedit_pre', $output); } +function clean_url( $url ) { + if ('' == $url) return $url; + $url = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $url); + $url = str_replace(';//', '://', $url); + $url = (!strstr($url, '://')) ? 'http://'.$url : $url; + $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); + return $url; +} + ?>