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; +} + ?>