Ticket #938: 938b.diff

File 938b.diff, 605 bytes (added by Nazgul, 6 years ago)
  • wp-includes/comment.php

     
    55 
    66        if (1 == get_option('comment_moderation')) return false; // If moderation is set to manual 
    77 
    8         if ( (count(explode('http:', $comment)) - 1) >= get_option('comment_max_links') ) 
     8        if ( preg_match_all("|(href\t*?=\t*?['\"]?)?(https?:)?//|i", $comment, $out) >= get_option('comment_max_links') ) 
    99                return false; // Check # of external links 
    1010 
    1111        $mod_keys = trim( get_option('moderation_keys') );