From ef4c17e167487c871d52d6ba9450a64be6bc814b Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 19 Nov 2008 07:08:37 +0000 Subject: [PATCH] Count links in comments after performing automatic linking. props tott. fixes #7821 git-svn-id: http://svn.automattic.com/wordpress/trunk@9782 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 47e51bcf88..7c8c2a3033 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -45,7 +45,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 ( get_option('comment_max_links') && preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) + if ( get_option('comment_max_links') && preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", apply_filters('comment_text', $comment), $out) >= get_option('comment_max_links') ) return false; // Check # of external links $mod_keys = trim(get_option('moderation_keys'));