Ticket #2546: 2546.diff
File 2546.diff, 1.6 KB (added by , 11 years ago) |
---|
-
src/includes/common/functions.php
787 787 $_post = array(); 788 788 $match_out = ''; 789 789 790 /** Blacklist *************************************************************/791 792 // Get the moderation keys793 $blacklist = trim( get_option( 'moderation_keys' ) );794 795 // Bail if blacklist is empty796 if ( empty( $blacklist ) )797 return true;798 799 790 /** User Data *************************************************************/ 800 791 801 792 // Map anonymous user data … … 829 820 /** Max Links *************************************************************/ 830 821 831 822 $max_links = get_option( 'comment_max_links' ); 832 if ( ! empty( $max_links ) ) {823 if ( ! empty( $max_links ) ) { 833 824 834 825 // How many links? 835 $num_links = preg_match_all( '/ <a [^>]*href/i', $content, $match_out );826 $num_links = preg_match_all( '/(http|ftp|https):\/\//i', $content, $match_out ); 836 827 837 828 // Allow for bumping the max to include the user's URL 838 829 $num_links = apply_filters( 'comment_max_links_url', $num_links, $_post['url'] ); … … 843 834 } 844 835 } 845 836 837 /** Blacklist *************************************************************/ 838 839 // Get the moderation keys 840 $blacklist = trim( get_option( 'moderation_keys' ) ); 841 842 // Bail if blacklist is empty 843 if ( empty( $blacklist ) ) { 844 return true; 845 } 846 846 847 /** Words *****************************************************************/ 847 848 848 849 // Get words separated by new lines