Ticket #938: 938.diff

File 938.diff, 0.6 kB (added by Nazgul, 2 years ago)
  • wp-includes/comment.php

    old new  
    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?:)?\/\/|", $comment, $out) >= get_option('comment_max_links') ) 
    99                return false; // Check # of external links 
    1010 
    1111        $mod_keys = trim( get_option('moderation_keys') );