diff options
Diffstat (limited to 'www/inc/www.class.inc.php')
-rw-r--r-- | www/inc/www.class.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/www/inc/www.class.inc.php b/www/inc/www.class.inc.php index bb61a5c..312ba50 100644 --- a/www/inc/www.class.inc.php +++ b/www/inc/www.class.inc.php @@ -289,14 +289,14 @@ class C_www { $comment_data = stripslashes(strip_tags($comment_data,$allowedTags)); // thanks google: // http://www.google.com/googleblog/2005/01/preventing-comment-spam.html - $comment_data = eregi_replace("<a ","<a rel=\"nofollow\" ",$comment_data); + $comment_data = preg_replace("/<a ","<a rel=\"nofollow\" /i",$comment_data); #further comment spam $comment_blacklist = array("pharmacy", "poker", "Viagra"); foreach($comment_blacklist as $blackword) { $check = addslashes($blackword); - if (eregi($check,$comment_data)) { + if (preg_match("/$check/i",$comment_data)) { #write error message $this->error( __('No comment spam'), __('Your comment includes blacklisted word') . __('No comment spam') ); $this->footer(); |