From f66977080ed4e250f9d1aa3c174f70a8b9927d6b Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 4 Oct 2006 04:43:25 +0000 Subject: [PATCH] comment link counting improvements from Nazgul. fixes: #938 git-svn-id: https://develop.svn.wordpress.org/trunk@4299 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 6b41f2ba57..74a4c633cf 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -5,7 +5,7 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $ if (1 == get_option('comment_moderation')) return false; // If moderation is set to manual - if ( (count(explode('http:', $comment)) - 1) >= get_option('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_option('moderation_keys') );