From beece40a1c30d9a232040f19536f60ec7eb31988 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 4 Oct 2006 04:45:22 +0000 Subject: [PATCH] comment link counting improvements from Nazgul. fixes: #938 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4300 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 630866956f..f22d03e7f4 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -833,7 +833,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ if (1 == get_settings('comment_moderation')) return false; // If moderation is set to manual - if ( (count(explode('http:', $comment)) - 1) >= get_settings('comment_max_links') ) + if ( preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) return false; // Check # of external links $mod_keys = trim( get_settings('moderation_keys') );