From d468232b2664aa34012aa73f6b8f2987d63acf64 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 28 Jan 2009 21:12:57 +0000 Subject: [PATCH] Don't count emoticons toward link total. Props tott. fixes #8627 #7821 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10453 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 49a39fd989..18bf0e1965 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", apply_filters('comment_text', $comment), $out) >= get_option('comment_max_links') ) + if ( get_option('comment_max_links') && preg_match_all("/<[Aa][^>]*[Hh][Rr][Ee][Ff]=['\"]([^\"'>]+)[^>]*>/", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') ) return false; // Check # of external links $mod_keys = trim(get_option('moderation_keys'));