You are here

function _cleantalk_filter_response in Anti Spam by CleanTalk 7.2

Same name and namespace in other branches
  1. 8 cleantalk.module \_cleantalk_filter_response()
  2. 7 cleantalk.module \_cleantalk_filter_response()

Cleantalk inner function - performs CleanTalk comment|errstr filtering.

1 call to _cleantalk_filter_response()
_cleantalk_check_spam in ./cleantalk.module
Cleantalk inner function - performs antispam checking.

File

./cleantalk.module, line 2138
Main CleanTalk integration module functions.

Code

function _cleantalk_filter_response($ct_response) {
  if (preg_match('//u', $ct_response)) {
    $err_str = preg_replace('/\\*\\*\\*/iu', '', $ct_response);
  }
  else {
    $err_str = preg_replace('/\\*\\*\\*/i', '', $ct_response);
  }
  return filter_xss($err_str, array(
    'a',
  ));
}