[wp-hackers] Proposed patch for spam problem

Owen Winkler ringmaster at midnightcircus.com
Tue Nov 2 12:29:19 UTC 2004


Kitty wrote:

>On Mon, 2004-11-01 at 10:51, David Clark wrote:
>  
>
>>my solution is to change that check to:
>>	if ( (count(explode('href', apply_filters('comment_text', $comment)))  
>>- 1) >= get_settings('comment_max_links') )
>>		return false; // Check # of external links
>>
>>is there a downside to this approach?
>>    
>>
>
>I think it's worthwhile. it's an easy way of avoiding a bunch of
>regex'ing added to check_comment. 
>  
>
Except that apply_filters('comment_text',...) could easily have more 
than one regex in it, and it would be executed twice using this.

Owen





More information about the hackers mailing list